MediaWiki:Common.js

Uit ROSA Wiki
Naar navigatie springen Naar zoeken springen

Opmerking: nadat u de wijzigingen hebt gepubliceerd is het wellicht nodig uw browsercache te legen.

  • Firefox / Safari: houd Shift ingedrukt terwijl u op Vernieuwen klikt of druk op Ctrl-F5 of Ctrl-R (⌘-Shift-R op een Mac)
  • Google Chrome: druk op Ctrl-Shift-R (⌘-Shift-R op een Mac)
  • Internet Explorer / Edge: houd Ctrl ingedrukt terwijl u op Vernieuwen klikt of druk op Ctrl-F5
  • Opera: druk op Ctrl-F5.
/* JavaScript die hier wordt geplaatst heeft invloed op alle pagina's voor alle gebruikers */
if (mw.config.get('wgNamespaceNumber')==6 && mw.config.get('wgAction')=='view') {
   mw.loader.load('//cdn.wikixl.nl/imagemapedit/ime.js');
}

/* override the JavaScript variable (from skins/common/mwsuggest.js) that controls the search box width. */

os_container_max_width = 3;  // Maximum width = 3 times original width

/* FIX for Semantic Drilldown: pagination links (vorige n, volgende n, 100, 250, etc.) ignore the '_single' setting, which introduces an unwanted category overview on the page shown at the pagination link */
$(document).ready(function () {
    var queryString = window.location.search;
    var urlParams = new URLSearchParams(queryString);
    if (urlParams.has('_single')) {
        /* change the pagination links, so the _single parameter is included */
	['mw-prevlink', 'mw-nextlink', 'mw-numlink'].forEach(function(linktype){
        var next = document.getElementsByClassName(linktype);
        for(var ii = 0; ii<next.length; ii++) {
			var theLink = next.item(ii);
			theLink.href += "&_single=";
		}
    });
	}
} );


// move status messages to the top of the page 
$( document ).ready( function () {
var msgs = document.getElementById('status');
var bc = document.getElementById('bodyContent');
if(bc && msgs) { bc.insertBefore(msgs, bc.childNodes[0]); }
} );

// move contentsub div (e.g. redirect messages) back to the top
$( document ).ready( function () {
var msgs = document.getElementById('contentSub');
var bc = document.getElementById('bodyContent');
if(bc && msgs) { bc.insertBefore(msgs, bc.childNodes[0]); }
} );