User:KhabarNegar/googleTitle.js

$(googleTitle); function googleTitle {		if(wgCanonicalNamespace == "") {			var subjectName; if(wgPageName.charAt(wgPageName.length - 1) == ")")			{				subjectName = wgPageName.substring(0, wgPageName.lastIndexOf("(") - 1); }			else {				subjectName = wgPageName; }			var searchNode = document.createElement("a"); searchNode.href = "http://www.google.com/search?q=" + subjectName.replace(/_/g, " ") + "+-wikipedia.org"; searchNode.target = "_blank"; searchNode.innerHTML = " Search Google "; document.getElementById("firstHeading").appendChild(searchNode); } }