Today I discovered a nice feature inside the Chrome developer tools: Code snippets.
Here are the steps to use it:
- Open Chrome. Hit F12 to load the Chrome Developer tools.
- Go to the Sources tab. On the Sources tab, you find a sub tab Snippets. Click on it. The first time you open it, it will be empty.
- Right click on the empty tab and choose New.
- A new snippet is created. You can choose a name and write the snippet code.
- When you are done writing your snippet, you can run it by right-clicking on it and choosing Run.
- Once the script is saved, it will be stored and is available each time you open up your Chrome Developer tools.