قالب وردپرس درنا توس
Home / Tips and Tricks / How to hack the hidden Google Chrome Dinosaur game

How to hack the hidden Google Chrome Dinosaur game



How to hack the hidden Google Chrome Dinosaur game

Most of us have seen the dreaded “No Internet” error message on Google Chrome. You can actually turn this screen into a fun, endless dino-themed running game and, even better, hack the one where the dinosaur becomes invincible. Here̵

7;s how.

How to play the hidden Google Chrome Dinosaur Game

If you do not have an internet connection, you do not need to do anything special to play. Just enter any URL in the address bar of Google Chrome and you will see this screen.

No internet screen in Google Chrome

If you do have an internet connection, you can access this page without cutting the connection. Type chrome://dino in the address bar, and it will take you there.

the address bar url for accessing dino games

Once you have reached this screen, you can start the game by tapping the space bar. When you do, the dinosaur will start running. The goal of the game is to avoid what comes your way, such as birds and cacti. When the dinosaur is hit by a bird or encounters a cactus, the game is over.

Dinosaur game gif

This is a pretty nice way to kill time, and it’s always fun to try to hit your own high score. As you continue, the difficulty of the game increases. It is interesting to think about what the highest score has ever been achieved, without cheating of course, which takes us to the next point.

RELATED: How to play Microsoft Edge’s Secret Surfing Game

Hack Google Chrome Dinosaur Game

This hack allows your dinosaur to become invincible, allowing players to continue the game without fear of being teased or hacked.

To hack the game, you must be on the “No Internet” screen, so go ahead and enter chrome://dino in the address bar. Once there, right-click anywhere on the screen and select “Inspect” from the menu that appears.

Check the option in the menu

This opens Chrome DevTools, which appears to the right of the browser window. In DevTools, select the “Console” tab.

Console tab in Chrome DevTools

Alternatively, you can press Ctrl + Shift + I and jump straight to the “Console” tab in Chrome DevTools.

RELATED: What your function keys do in Chrome DevTools

Once on the “Console” tab, paste the following command and then press the “Enter” key:

var original = Runner.prototype.gameOver

First code entered for Chrome hack

It may seem like it does nothing, but we will explain why this is necessary in a second.

Then enter this command:

Runner.prototype.gameOver = function (){}

Second command to hack the Chrome game

On the next line, f (){} appears after you press the “Enter” key.

Here’s what’s happening now. When the game is over (ie when you hit an object) it is called Runner.prototype.gameOver () and the action is triggered. In this case, you hear a sound, the game stops, and a Game Over message is displayed. It’s without our code.

What our code does is replace the gameOver function with an empty function. This means that instead of hearing the sound, the game stops and the message is displayed, nothing happens. You just keep running.

Test it. Close DevTools and press the space bar to start playing the game.

Invincible dinosaur gif

As you can see, the dinosaur is not affected by cacti or flying creatures. Mission completed.

Now let’s say you’ve been playing for 25 minutes and you want to stop the game and record your high score. You need a way to end the game, which can no longer be done by encountering a cactus.

Do you remember the first code we entered? It stored the normal gameOver function in original variable. This means that we can now execute this command to use the normal gameOver work:

Runner.prototype.gameOver = original

Exit game code

If you are interested, you can (see 2) look at what should happen when normal gameOver function is called.




Source link