User:JWGreen/monobook.js

function externISBN { var magicURL = "http://mnpals.cord.edu/F/3UI9A78NTE5SKQ7XAQ44BPUC357LMQPMX7M9ELNIUAX7SVKPVC-22567?func=find-a&find_code=ISBN&request=MAGICNUMBER&adjacent=N&request_op=AND&find_code=WRD&request=&request_op=AND&find_code=WRD&request=&local_base=&filter_code_1=WLA&filter_request_1=&filter_code_2=WYR&filter_request_2=&filter_code_3=WYR&filter_request_3=&filter_code_4=WTP&filter_request_4=&filter_code_6=WSB&filter_request_6=&filter_code_5=WCL&filter_request_5=&x=15&y=6"; var magicRegex = /MAGICNUMBER/ig; if(wgPageName != "Special:Booksources" && wgPageName != "Wikipedia:Book_sources"){ for (var i = 0; i < document.links.length; i++) { if( document.links[i].href.match(/isbn=(.*)/) ) { document.links[i].href=magicURL.replace(magicRegex, RegExp.$1); }   }  } }