Run Snippets Of JavaScript On Any Page With Chrome DevTools

If you find yourself running the same code in the Console repeatedly,
consider saving the code as a Snippet instead. Snippets are scripts that you author in the
Sources panel. They have access to the page's JavaScript context, and
you can run them on any page. Snippets are an alternative to bookmarklets.
Firefox DevTools has a feature similar to Snippets called Scratchpad.

For example, Figure 1 shows the DevTools homepage on the left and some Snippet source code
on the right.