Load javascript via Firebug console

Don Ch picture Don Ch · Jun 10, 2010 · Viewed 19.9k times · Source

How can I load a javascript file via Firebug console ?

This would be useful in development, so I don't have to modify the html code to load the script.

Answer

Justin Johnson picture Justin Johnson · Jun 10, 2010
var script = document.createElement("script");
script.src = "http://whatever.com/js/my/script.js";
document.body.appendChild(script);