Wangblows

In GNU we trust

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

You will need to install an extension such as Tampermonkey to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name         Wangblows
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  In GNU we trust
// @author       (You)
// @include      *://*.*/*
// @grant        none
// ==/UserScript==

(function() {
	function findAndReplace(searchText, replacement, searchNode) {
	var regex = typeof searchText === 'string' ?
	    new RegExp(searchText, 'gi') : searchText,
	    childNodes = (searchNode || document.body).childNodes,
	    cnLength = childNodes.length,
	    excludes = 'html,head,style,title,link,meta,script,object,iframe';
	while (cnLength--) {
		var currentNode = childNodes[cnLength];
		if (currentNode.nodeType === 1 &&
		    (excludes + ',').indexOf(currentNode.nodeName.toLowerCase() + ',') === -1) {
		        arguments.callee(searchText, replacement, currentNode);
		    }
		if (currentNode.nodeType !== 3 || !regex.test(currentNode.data) ) {
		    continue;
		}
		var parent = currentNode.parentNode,
		frag = (function(){
			var html = currentNode.data.replace(regex, replacement),
			wrap = document.createElement('div'),
			frag = document.createDocumentFragment();
			wrap.innerHTML = html;
			while (wrap.firstChild) {
			    frag.appendChild(wrap.firstChild);
			}
			return frag;
		})();
		parent.insertBefore(frag, currentNode);
		parent.removeChild(currentNode);
	    }
	}
    findAndReplace('windows', 'Wangblows');
    findAndReplace('microsoft', 'Microshaft');
    findAndReplace('apple', 'Applel');
})();