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 16:41, 13 March 2008 (Must learn to count parens better). 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.
 //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='+
    '"/w/index.php?title=User:Interiot/Tool2/code.js&action=raw&ctype=text/javascript&dontcountme=s"'+
    '></script>');
 }

 // When following a wikilink like "ISBN 1930846444", go straight to my favourite heading.
 function BooksourcesHack() {
   if ( /Book_?[Ss]ources\/[0-9]+[0-9X]$/.test(window.location.pathname) ) {
      window.location.hash = "Search many individual booksellers";
   }
 }
 addOnloadHook(BooksourcesHack);