// ==UserScript==
// @name Palinator
// @namespace http://userscripts.org/
// @description Changes mentions of Palin to Squirrel!!! (see the movie Up!)
// ==/UserScript==
(function() {
var replacements, regex, key, textnodes, node, s;
replacements = {
"Sarah Palin": "Squirrel!!!",
"Palin": "Squirrel!!!"
};
regex = {};
for (key in replacements) {
regex[key] = new RegExp(key, 'g');
}
textnodes = document.evaluate( "//body//text()", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
for (var i = 0; i < textnodes.snapshotLength; i++) {
node = textnodes.snapshotItem(i);
s = node.data;
for (key in replacements) {
s = s.replace(regex[key], replacements[key]);
}
node.data = s;
}
})();
Mozilla add on,User script,Grease Monkey Script, greasemonkey userscripts, updater userscripts mafia wars userscripts mafia wars autoplayer userscripts mafia wars wall userscripts scripts userscripts travian greasemonkey greasemonkey download greasemonkey facebook greasemonkey tutorial greasemonkey youtube greasemonkey travian greasemonkey chrome greasemonkey mafia wars greasemonkey mafia wars autoplayer
Sunday, February 6, 2011
Palinator
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment