User:AndyZ/monobook.js/personalredirect.js

This is an old revision of this page, as edited by AndyZ (talk | contribs) at 21:25, 9 June 2006 (fix up). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
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>
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+"User:AndyZ" 
}

Please add all the personal redirects before the closing brace at the end.
*/



//end brace
}
//</pre>