User:AndyZ/monobook.js/personalredirect.js

This is the current revision of this page, as edited by AndyZ (talk | contribs) at 02:09, 2 January 2007 (not thinking straight). The present address (URL) is a permanent link to this version.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
//<pre>
var p_redirects = new Array(
    ["WHAT YOU TYPE IN", "WHERE YOU WANT TO GO"],   //update this
    ["WHAT YOU TYPE IN", "WHERE YOU WANT TO GO"],   //array
    ["WHAT YOU TYPE IN", "WHERE YOU WANT TO GO"],
    ["WHAT YOU TYPE IN", "WHERE YOU WANT TO GO"]
    );

if(wgPageName == "Special:Search"){
    for(i = 0; i < p_redirects.length; i++){
        if(document.getElementById("contentSub").getElementsByTagName("a")[0].innerHTML == p_redirects[i][0])
        	document.___location.href = "http://en.wikipedia.org/wiki/" + p_redirects[i][1];
    }
}
//</pre>