מדיה ויקי:סקריפטים/81.js

מתוך ויקיפדיה, האנציקלופדיה החופשית

הערה: לאחר הפרסום, ייתכן שיהיה צורך לנקות את זיכרון המטמון (cache) של הדפדפן כדי להבחין בשינויים.

  • פיירפוקס / ספארי: להחזיק את המקש Shift בעת לחיצה על טעינה מחדש (Reload) או ללחוץ על צירוף המקשים Ctrl-F5 או Ctrl-R (במחשב מק: ⌘-R).
  • גוגל כרום: ללחוץ על צירוף המקשים Ctrl-Shift-R (במחשב מק: ⌘-Shift-R).
  • אינטרנט אקספלורר / אדג': להחזיק את המקש Ctrl בעת לחיצה על רענן (Refresh) או ללחוץ על צירוף המקשים Ctrl-F5.
  • אופרה: ללחוץ על Ctrl-F5.
// 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 ); 
		} );
} );