This bit of JavaScript code extends the game built into the 2022-12-01 Google Doodle for Gerald "Jerry" Lawson's 82nd Birthday.
Press the ‘R’ key on your keyboard while a level is running to restart the level. This is equivalent to clicking the Pause button and then clicking Restart very quickly.
This script saves time and effort because it allows you to keep your hands on the keyboard while playing a level that requires many restarts. A level might require restarts if it softlocks you upon failure or if you are practicing speedrunning it from the beginning.
-
Open just the game, not the whole Google Doodle page.
- If you are playing the built-in levels or a level you developed, you can just visit https://www.google.com/logos/2022/lawson/r11292/lawson.html.
- If you opened a link to a level, load the URL of the
iframe
within the link. If you don’t know how to do this, these steps will also work:- Find the value of the
doodle
query parameter within the URL you arrived at. If the URL you are at contains…?doodle=THIS_PART&platform=…
, you wantTHIS_PART
.- Example: https://g.co/doodle/rhahnjh leads to a URL whose
doodle
value to copy is207425764-GpYBCpEBjZCJrgIxCEVvVOxgR1q3SYz__4duy3txOtGkLkXKSUgLF0oZYYwJCFM4NGDM4NFiDkFAxAJLrLDGBt86XZH7SDH_yMqPSru3PV_-h96nNINL8boNlDe1v9dxMDkanFTOJheTaxU3lT-T_0pIs8BMxIN7WjoGL4p658kTxY8At7m8GZy81cv25cIxPdC5TpunBxgB
- Example: https://g.co/doodle/rhahnjh leads to a URL whose
- Copy this base URL and paste it into the address bar:
https://www.google.com/logos/2022/lawson/r1201/lawson.html?hl=en&sdoodles=1&doodle=
- Paste the
doodle
value at the end of that link, then press Enter/Return to visit the URL.
- Find the value of the
-
Copy the JavaScript code within
install-restart-hotkey.js
in this Gist. -
Switch to the game tab.
-
Open the Web Console of the current page in your browser.
- Chrome instructions: open DevTools, use the Console
- Firefox instructions
-
Paste the copied code into the Console.
-
Press Enter/Return to run the code.