User:I18n/monobook.js
Jump to navigation
Jump to search
Note: After saving, you have to bypass your browser's cache to see the changes. Internet Explorer: press Ctrl-F5, Mozilla: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Opera/Konqueror: press F5, Safari: hold down Shift + Alt while clicking Reload, Chrome: hold down Shift while clicking Reload.
The accompanying .css page for this skin can be added at User:I18n/monobook.css. |
- Report page listing warnings and errors.
/* moved to [[user:I18n/common.js]] */
/* test */
function linkingviaVIAF() {
/* goal / future var targetURL = "http://librarything.com/author/viaf/viaf.org"; */
/* today */
var targetURL = "http://yi.librarything.com/commonknowledge/search.php?f=13&exact=1&q=VIAF%3Aviaf.org";
var magicRegex = /viaf.org/ig;
for (var i = 0; i < document.links.length; i++)
{
if( document.links[i].href.match(/viaf.org\/(.*)/) )
{
/* document.links[i].href=targetURL.replace(magicRegex, RegExp.$1); */
document.links[i].href=targetURL.replace(magicRegex, RegExp.$1.replace(/[\D]*/g, ''))
}
}
}
$(linkingviaVIAF);