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

  • פיירפוקס / ספארי: להחזיק את המקש Shift בעת לחיצה על טעינה מחדש (Reload) או ללחוץ על צירוף המקשים Ctrl-F5 או Ctrl-R (במחשב מק: ⌘-R).
  • גוגל כרום: ללחוץ על צירוף המקשים Ctrl-Shift-R (במחשב מק: ⌘-Shift-R).
  • אינטרנט אקספלורר / אדג': להחזיק את המקש Ctrl בעת לחיצה על רענן (Refresh) או ללחוץ על צירוף המקשים Ctrl-F5.
  • אופרה: ללחוץ על Ctrl-F5.
$( function () {
	'use strict';

	// On Special:Recentchanges, show information about the number of changes
	// per day in a recent changes list, and the number of unique changes
	var showRecentChangesStats = function () {
		var i18n;
		
		i18n = {
			items: 'פריטים',
			uniquepages: 'ייחודיים',
			visualeditor: 'חזותי',
			mobilevisualeditor: 'חזותי נייד',
			contenttranslation: 'תרגום'
		};
		
		$( '.mw-changeslist ul' ).each( function ( i, changesList ) {
			var $items,
				titles = {},
				$changesList = $( changesList );
			
			$items = $changesList.find( 'li' );
			
			$items.each( function ( i, changeItem ) {
				titles[ $( changeItem ).find( 'span.mw-title' ).text() ] = true;
			} );		

			$changesList.before( $( '<div>' ).text( [
				i18n.items + ': ' + $items.length,
				i18n.uniquepages + ': ' + Object.keys( titles ).length,
				i18n.visualeditor + ': ' + $changesList.find( '.mw-tag-visualeditor' ).length,
				i18n.mobilevisualeditor + ': ' + $changesList.find(
					'.mw-tag-visualeditor.mw-tag-mobile_web_edit'
				).length,
				i18n.contenttranslation + ': ' + $changesList.find( '.mw-tag-contenttranslation' ).length
			].join ( ' | ' ) ) );
		} );
	};

	if ( mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Recentchanges' ) {
		mw.loader.using( 'mediawiki.Uri' ).then( function () {
			var uri = new mw.Uri();
			
			if ( uri.query.voting === 'evil' ) {
				showRecentChangesStats();
			}
		} );
	}
} );