if ( mw.config.get('wgNamespaceNumber') == 6 ) {mw.loader.using( ['mediawiki.util'], function() {var rescaled = mw.util.addPortletLink( 'p-cactions', '#','rescaled', 'ca-rescaled', 'Rescaled per F5');$( rescaled ).click( do_it );});}function do_it() {var api = new mw.Api();api.get( {action: 'query',prop: 'imageinfo|revisions',titles: mw.config.get('wgPageName'),iiprop: 'archivename',iilimit: 'max',rvprop: 'content',rvlimit: '1'}).done( function ( data ) {var pgdata = data.query.pages[mw.config.get('wgArticleId')];var imgs = pgdata.imageinfo;console.log(imgs);var todelete = [];$.each( imgs, function ( index, value ) {if ( index === 0 ) {return;}todelete.push( value.archivename.split('!')[0] );});api.postWithToken( 'delete', {action: 'revisiondelete',type: 'oldimage',target: mw.config.get('wgPageName'),ids: todelete.join('|'),hide: 'content',reason: 'Orphaned non-free file(s) deleted per [[WP:F5|F5]]'}).done( function( data ) {mw.notify("Deleted old revision.");});// Also edit!var text = pgdata.revisions[0]['*'];// from drilnoth's script//text = text.replace(/\n*\{\{\s?(Non\-free reduced|Orphaned non\-free revisions)\s?\|\s?(?:\d|date)?\=?(\d\d\:\d\d\,\s\d\d?\s.*\s\d\d\d\d(\s\(UTC\))?|.*\d\d?(?:\s[a-z]+)?\s\d\d\d\d|\d{14})\s?(\s?\|human\=yes)?\}\}/ig,''); text = text.replace(/\n*\{\{(?:[Oo]rphaned non-free revisions|[Nn]on-free reduced).*}}/ig,'');text = text.trim();api.postWithToken( 'edit', {action: 'edit',title: mw.config.get('wgPageName'),summary: 'Previous version(s) deleted per [[WP:F5|F5]])',text: text}).done( function ( data ) {mw.notify("Removed the template.");});});}
🔥 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