/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// ==UserScript== // @name Name of your script // @namespace // @include http://www.example.com/* // ==/UserScript== var script = "http://localhost/yourscript.js"; if (typeof GM_addScript != "undefined") { GM_addScript(script); } else if (typeof GM_addScript != "undefined") { GM_addScript(script); } else { var heads = document.getElementsByTagName("head"); if (heads.length > 0) { var node = document.createElement("script"); node.type = "text/javascript"; node.src = script // node.innerHTML = script; heads[0].appendChild(node); } }