User:Environnement2100/monobook.js

From Wikipedia, the free encyclopedia
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.
importScript('User:Mr.Z-man/refToolbar.js');


function externISBN() {
 
  var magicURL = "http://www.amazon.com/exec/obidos/ASIN/MAGICNUMBER/wikipedia08-20";
 
  var magicRegex = /MAGICNUMBER/ig;
  if(wgPageName != "Special:Ouvrages_de_référence" && wgPageName != "Wikipédia:Ouvrages_de_référence"){
    for (var i = 0; i < document.links.length; i++) {       
      if( document.links[i].href.match(/Special:Ouvrages_de_r(%C3%A9|é)f(%C3%A9|é)rence\/(.*)/) ) {
        document.links[i].href=magicURL.replace(magicRegex, RegExp.$3);
      }
    }
  }
 
} 
addOnloadHook(externISBN);



// [[User:Zocky/SearchBox.js]]
document.write('<script type="text/javascript" src="' 
             + 'http://en.wikipedia.org/w/index.php?title=User:Zocky/SearchBox.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

//[[User:TheDJ/HotCat]]
importScript('User:TheDJ/Gadget-HotCat.js');

<source lang="javascript">
// Add [[WP:Reflinks]] launcher in the toolbox on left
addOnloadHook(function () {
 mw.util.addPortletLink(
  "p-tb",     // toolbox portlet
  "http://toolserver.org/~dispenser/cgi-bin/webreflinks.py/" + wgPageName 
   + "?client=script&citeweb=on&overwrite=&limit=20&lang=" + wgContentLanguage,
  "Reflinks"  // link label
)});
</source>