( function( $, mw ) { var baseTooltip = 'List of pages with unreviewed edits' mw.util.addPortletLink( 'p-tb', // toolbox ID mw.util.getUrl( 'Special:PendingChanges' ), // Pending changes link 'Pending changes', // link text 't-pendingchanges', // link ID baseTooltip // link tooltip ); function plural( num, text ) { return num + ' ' + text + ( num !== 1 ? 's' : '' ); } function updateNumChanges() { new mw.Api().get( { action: 'query', list: 'oldreviewedpages', orlimit: 40, ornamespace: [ 0, 4 ] } ).done( function ( data ) { if ( !data.query ) { return; } var numChanges = data.query.oldreviewedpages.length, oldestTimestamp = null; if ( numChanges > 0 ) { oldestTimestamp = data.query.oldreviewedpages[0].pending_since; var then = new Date( oldestTimestamp ).getTime(), now = Date.now(), msDiff = now - then, hourDiff = Math.round( msDiff / 36e5 ); } if( data.continue ){ numChanges += '+'; } $( '#t-pendingchanges a' ) .text( plural( numChanges, 'pending edit' ) ) .attr( 'title', function () { if ( !oldestTimestamp ) { return baseTooltip; } return baseTooltip + '.\nOldest is ' + plural( hourDiff, 'hour' ) + ' old.'; } ); }); } updateNumChanges(); setInterval( updateNumChanges, 2 * 60000 ); // update every 2 minutes} ) ( jQuery, mediaWiki );
🔥 Top keywords: Main PageSpecial:SearchPage 3Wikipedia:Featured picturesHouse of the DragonUEFA Euro 2024Bryson DeChambeauJuneteenthInside Out 2Eid al-AdhaCleopatraDeaths in 2024Merrily We Roll Along (musical)Jonathan GroffJude Bellingham.xxx77th Tony AwardsBridgertonGary PlauchéKylian MbappéDaniel RadcliffeUEFA European Championship2024 ICC Men's T20 World CupUnit 731The Boys (TV series)Rory McIlroyN'Golo KantéUEFA Euro 2020YouTubeRomelu LukakuOpinion polling for the 2024 United Kingdom general electionThe Boys season 4Romania national football teamNicola CoughlanStereophonic (play)Gene WilderErin DarkeAntoine GriezmannProject 2025