Skip to content

Instantly share code, notes, and snippets.

@arnar
Created October 8, 2008 12:35
Show Gist options
  • Save arnar/15506 to your computer and use it in GitHub Desktop.
Save arnar/15506 to your computer and use it in GitHub Desktop.
CmdUtils.CreateCommand({
name: "jquery",
preview: "Injects the latest version of jQuery into the current page.",
execute: function() {
var s=Application.activeWindow.activeTab.document.createElement('script');
s.setAttribute('src','http://jquery.com/src/jquery-latest.js');
Application.activeWindow.activeTab.document.getElementsByTagName('body')[0].appendChild(s);
displayMessage( "jQuery injected in current page");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment