User:השמעון/common.js

//סקריפט 81 // display system-messages names instead of the system messages themselves. mw.loader.using( 'mediawiki.util' ).done( function {	var things = { 'הצג הודעות מערכת' : 'uselang=qqx',					'חזותי': 'veaction=edit',					'purge': 'action=purge',					'safemode': 'safemode=1',					'debug': 'debug=1'	};	if (window.index_php_params) {		$.extend(things, window.index_php_params);	}	function gothere( e ) {		var key = $( this ).text,			there = things[key];	    e.preventDefault;	    var href = window.location.href.replace( /#.*/, '' );	    href += ( ( /\?/.test( href ) ? '&' : '?' ) + there );	    window.location.href = href;	}	Object.keys( things )		.forEach( function(key) { if (things[key]) $( mw.util.addPortletLink( 'p-cactions', '', key ) ).click( gothere ); } ); } );