User:Franamax/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:Krimpet/CH2.js');

// begin testing sortable2
//importScript('User:Franamax/sortable2.js');
// end testing sortable2
//importScript('User:Voice_of_All/Specialadmin/monobook.js');
/*
function test_123() {
//alert('testing\r\none-two-three');
   var spanlist = document.getElementsByTagName("span");
   for (x=0;x<spanlist.length;++x) {
      elt = spanlist[x]; 
      if (elt.className != "IPA") continue;
      elt.title="test_456";
      }
}*/
//addOnloadHook(test_123);
//function test_456(intxt) {
//   alert('IPA1:'+intxt);
//}
//importScript('User:Lupin/popups.js');

//this function bolds and fuchsia-izes large positive additions to the watchlist
/*
function bold_pos_watchlist() {
   if (wgPageName != "Special:Watchlist") return;
   var spanlist = document.getElementsByTagName("span");
   for (x=0;x<spanlist.length;++x) {
      elt = spanlist[x]; 
if (elt.className != "mw-plusminus-pos") continue;
      if (elt.innerHTML.indexOf(",") < 0) continue;
      elt.style.fontWeight = "bold";
      elt.style.color = "fuchsia";
      }
   }*/
//addOnloadHook(bold_pos_watchlist);
// end of watchlist bolding function
/*
function externISBN() {
 
  var magicURL = "http://www.amazon.co.uk/exec/obidos/ASIN/MAGICNUMBER/";
 
  var magicRegex = /MAGICNUMBER/ig;
  if(wgPageName != "Special:BookSources" && !(wgTitle == "Book sources" && wgCanonicalNamespace == "Project")){
    for (var i = 0; i < document.links.length; i++) {       
      if( document.links[i].href.match(/Special:BookSources\/(.*)/) ) {
        document.links[i].href=magicURL.replace(magicRegex, RegExp.$1);
      }
    }
  }
 
}*/
 
//addOnloadHook(externISBN);