Return to Snippet

Revision: 42984
at March 14, 2011 21:07 by nasso


Updated Code
// ==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); 
	}
}

Revision: 42983
at March 14, 2011 21:00 by nasso


Initial Code
// ==UserScript==
// @name           Jquery progretis 
// @namespace      Jquery progretis 
// @include        http://progretis.b2b2c1.rec.groupe.generali.fr/*
// ==/UserScript==

var script = "http://localhost/b2b2cressources/commun/javascript/progretis.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); 
	}
}

Initial URL

                                

Initial Description

                                

Initial Title
greaseMonkey - Ajout script personnelle sur vos pages - Add your owner javascript in your html\'s code

Initial Tags
javascript

Initial Language
JavaScript