User:AndyZ/monobook.js/personalredirect.js: Difference between revisions

Content deleted Content added
testing
 
m not thinking straight
 
(5 intermediate revisions by the same user not shown)
Line 1:
//<pre>
if(document.___location.href.substring(0,51)=="http://en.wikipedia.org/wiki/Special:Search?search="){
var p_redirects = new Array(
thePage = document.___location.href.substring(51,document.___location.href.length)
["WHAT YOU TYPE IN", "WHERE YOU WANT TO GO"], //update this
if(thePage=="U:AZ"){
["WHAT YOU TYPE IN", "WHERE YOU WANT TO GO"], //array
document.___location.href = "http://en.wikipedia.org/wiki/User:AndyZ"
["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])
if( document.___location.href.substring(0,51)= = "http://en.wikipedia.org/wiki/Special:Search?search="){ + p_redirects[i][1];
}
}
//</pre>