User:Quiddity/monobook.js

From Wikipedia, the free encyclopedia

Note: After saving, you have to bypass your browser's cache to see the changes. Firefox/Mozilla/Safari: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Internet Explorer: press Ctrl-F5, Opera/Konqueror: press F5.

If a message on your talk page led you here, please be wary of who left it. The code below could contain malicious content capable of compromising your account; if your account appears to be compromised, it will be blocked. If you are unsure whether the code is safe, you can ask at the appropriate village pump.
//This code will change ISBN links to point to the url of your choice,
//instead of Special:Book_sources. See:[[User:Lunchboxhero/monobook.js]]

function externISBN() {
for (var i = 0; i < document.links.length; i++) 
{if( document.links[i].href.match(/isbn=(.*)/) ) {document.links[i].href='http://www.amazon.com/exec/obidos/ASIN/'+RegExp.$1;}}}
addOnloadHook(externISBN);


// Twinkle tests
// importScript('User:AzaToth/morebits.js');
// importScript('User:AzaToth/twinklefluff.js');
// importScript('Wikipedia:WikiProject User scripts/Scripts/Add LI menu');
// importStylesheet('Wikipedia:WikiProject User scripts/Scripts/Add LI menu/css');
// importScript('User:AzaToth/twinklewarn.js');
// importScript('User:AzaToth/twinklediff.js');
// TwinkleConfig = {watchRevertedPages  :       [],}