Thursday, July 16, 2015

Chrome Developer Tools–Run remote code snippets

Yesterday, I posted about the Code Snippets feature inside the Chrome Developer tools. One thing that is annoying is that you have to create your scripts locally and there is no built-in way to share them.

Gleb Bahmutov brought a solution by sharing a code snippet to load your scripts dynamically. A good idea is to set up an internal site where you host all the snippets you want to share. These scripts can then be loaded using the following script:

Note: By using this script it is possible to load snippets from any source. Be careful as this imposes a security risk if you load and execute scripts from other locations.

No comments: