Skip to content

Instantly share code, notes, and snippets.

@chrisjd20
Last active December 22, 2023 08:13
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save chrisjd20/93771da596ca5e49043f148a845c469f to your computer and use it in GitHub Desktop.
Save chrisjd20/93771da596ca5e49043f148a845c469f to your computer and use it in GitHub Desktop.
How To Select An Iframe From the Developer Console So You Can Tweak Variables Or Modify Url Etc...

The developer console in most modern browsers can be quite powerful for modifying websites live. This includes modifying HTML, CSS and even Javascript.

To do this, one can:

  1. Right-Click the iframe and select Inspect. OR CTRL + Shift + i (in Chrome).
  2. Select Console tab.
  3. Click the downward arrow to select the JavaScript console for the iframes windows.
  4. All JavaScript variables are now accessible from the javascript console. You can tweak these values to modify all things about the Windows from variables to the iframe windows current URL/URL parameters (window.location.href).

See image:

image

This is only a made up example and wont work in any real-game. But for example, if I have a myplayer object with an attribute called throwDelay, I could tweak that by doing myplayer.throwDelay = 0

Here is an example of accessing such an example variable from the JS console:

image

You can also access the windows URL in the javascript console using window.location.href. You can also set or modify it via that variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment