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

Content deleted Content added
fix
usage
Line 1:
if(document.___location.href.substring(0,51)=="http://en.wikipedia.org/wiki/Special:Search?search="){
thePage = document.___location.href.substring(51,document.___location.href.length)
wikiURL = "http://en.wikipedia.org/wiki/"
/*
Usage for personal redirects:
 
Add the contents of this page. For every personal redirect you wish to add, add the following onto your monobook.js file:
 
if(thePage=="THE REDIRECT"){
document.___location.href = wikiURL+"THE PAGE YOU WISH TO REACH"
}
 
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+"http://en.wikipedia.org/wiki/User:AndyZ"
}
*/
 
if(thePage=="U%3AAZ"){
document.___location.href = wikiURL+"User:AndyZ"
}