User:Pegship/monobook.js

function externISBN {

var magicURL = "http://www.worldcat.org/search?q=MAGICNUMBER"; var magicRegex = /MAGICNUMBER/ig; if(mw.config.get('wgPageName') != "Special:BookSources" && !(mw.config.get('wgTitle') == "Book sources" && mw.config.get('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);

importScript('Wikipedia:WikiProject User scripts/Scripts/Add LI menu'); importStylesheet('Wikipedia:WikiProject User scripts/Scripts/Add LI menu/css'); importScript('Wikipedia:WikiProject User scripts/Scripts/Compact Navigation');

addOnloadHook(function {	var disabled_urls = new Array('action=history', '/Special:', 'title=Special:');	for (var i = 0; i < disabled_urls.length; i++)	{		if (document.location.href.indexOf(disabled_urls[i]) != -1)			return;	}	var unique_url = false;	var wikiPreview = new Array('action=edit', 'action=submit');	for (var i = 0; i < wikiPreview.length; i++)	{		if (document.location.href.indexOf(wikiPreview[i]) != -1)			unique_url = 'wikiPreview';	}	var element_id = unique_url ? unique_url : 'bodyContent';	document.getElementById(element_id).innerHTML = 		document.getElementById(element_id).innerHTML.replace(/(\d\d):(\d\d), (\d{1,2}) ([A-Z][a-z]+) (\d{4}) \(UTC\)/g, adjustTime); });