User:Dragons flight/monobook.js

function fixSecureLink { if (mw.config.get('wgServer') == "https://secure.wikimedia.org") { for( var k = 0; k < document.links.length; k++ ) { var link = document.links[k]; if( link.href.indexOf('https://secure.wikimedia.org/wiki/') > -1 ) { var new_link = mw.config.get('wgServer') + mw.config.get('wgArticlePath'); new_link = new_link.replace("$1",""); link.href = link.href.replace('https://secure.wikimedia.org/wiki/',new_link); }   }  } }

addOnloadHook( fixSecureLink );