//<pre>
var p_redirects = new Array(
if(document.___location.href.substring(0,51)=="http://en.wikipedia.org/wiki/Special:Search?search="){
["WHAT YOU TYPE IN", "WHERE YOU WANT TO GO"], //update this
thePage = document.___location.href.substring(51,document.___location.href.length)
["WHAT YOU TYPE IN", "WHERE YOU WANT TO GO"], //array
wikiURL = "http://en.wikipedia.org/wiki/"
["WHAT YOU TYPE IN", "WHERE YOU WANT TO GO"],
/*
["WHAT YOU TYPE IN", "WHERE YOU WANT TO GO"]
Usage for personal redirects:
);
if(wgPageName == "Special:Search"){
Add the contents of this page. For every personal redirect you wish to add, add the following onto your monobook.js file:
for(i = 0; i < p_redirects.length; i++){
if(document.getElementById("contentSub").getElementsByTagName("a")[0].innerHTML == p_redirects[i][0])
if(thePage=="THE REDIRECT"){
document.___location.href = wikiURL+"THE PAGE YOU WISH TO REACH"p_redirects[i][1];
}
}
where THE REDIRECT is the redirect (note: colons should be replaced with %3A), and THE PAGE YOU WISH TO REACH is the title of the page you wish to reach. Please do not forget the quotes, otherwise it won't work.
For example,
if(thePage=="U%3AAZ"){
document.___location.href = wikiURL+"User:AndyZ"
}
Please add all the personal redirects before the closing brace at the end.
*/
//end brace
}
//</pre>
|