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"); } });