Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name My Fancy New Userscript
- // @namespace http://your.homepage/
- // @version 0.1
- // @description enter something useful
- // @author You
- // @grant none
- // @match *://*.youtube.com/*
- // ==/UserScript==
- addJS_Node (null, null, GM_main);
- function addJS_Node (text, s_URL, funcToRun, runOnLoad) {
- var D = document;
- var scriptNode = D.createElement ('script');
- if (runOnLoad) {
- scriptNode.addEventListener ("load", runOnLoad, false);
- }
- scriptNode.type = "text/javascript";
- if (text) scriptNode.textContent = text;
- if (s_URL) scriptNode.src = s_URL;
- if (funcToRun) scriptNode.textContent = '(' + funcToRun.toString() + ')()';
- var targ = D.getElementsByTagName ('head')[0] || D.body || D.documentElement;
- targ.appendChild (scriptNode);
- open(location, '_self').close();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement