Jump to content

User:Chris Chittleborough/monobook.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Chris Chittleborough (talk | contribs) at 14:00, 18 November 2009 (Get RexEx right.). 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.
 // When following a wikilink like "ISBN 1930846444",
 //  open the page at my favorite heading.
 addOnloadHook(function () {
   if ( /Book_?[Ss]ources\/[0-9-]+[0-9X]$/.test(window.location.pathname) ) {
      window.location.hash = "Individual_online_booksellers";
   }
 })

 //Interiot's javascript edit counter; only active on visits to [[User:Interiot/Tool2/code.js]]
 if (document.title.indexOf('User:Interiot/Tool2/code.js') != -1) {
    document.write('<script type="text/javascript" src="' 
    + 'http://en.wikipedia.org/w/index.php?title=User:Interiot/Tool2/code.js' 
    + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
 }