MediaWiki:Monobook.js
Let op! Nadat u de veranderingen heeft opgeslagen, moet u de cache van uw browser nog legen om ze daadwerkelijk te zien.
Mozilla (incl. Firefox) | Ctrl+Shift+R |
Internet Explorer | Ctrl+F5 |
Opera | F5 |
Safari | Cmd+R |
Konqueror | F5 |
/* </pre>
==doRedirect==
<pre> */
/* Redirect if a case-insensitive search on an external link is found */
function doRedirect() {
dym = document.getElementById('did-you-mean')
if ( dym ) {
if ( getCookie('WiktionaryDisableAutoRedirect') != 'true' ) {
var dymtarget = dym.firstChild.title ;
var target = dymtarget ;
pagetitle = document.getElementsByTagName('h1').item(0).firstChild.nodeValue;
if (pagetitle == target) {
alert('No looping allowed.');
return;
}
if ( pagetitle.toLowerCase().replace(/[^a-z]/g, "") != target.toLowerCase().replace(/[^a-z]/g, "") ) {
alert(target + " does not match " + pagetitle);
return;
}
if ( pagetitle.search(/Editing /g) != -1 ) return;
pagenamee = pagetitle.replace(/\ /g, "_");
document.location.replace( '//en.wiktionary.org/wiki/Special:Search/' + pagenamee ) ;
}
}
}
/* </pre>
==fixEditSectionWikifiedLinks==
<pre> */
// edit-section still doesn't return to correct spot if link contains a [[wikified]] term.
function fixEditSectionWikifiedLinks() {
if (/\.5B/.test(window.location.href)) {
var url=window.location.href.replace(/.5B.5B:/g,"").replace(/.5B/g, "").replace(/.5D/g, "");
window.location = url;
}
//removed check for 7B/7D
}