MediaWiki:Gadget-Purge.js: Difference between revisions
Jump to navigation
Jump to search
Want an adless experience? Log in or Create an account.
(Created page.) |
(load mediawiki.util) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 3: | Line 3: | ||
// adds a "purge" tab (after "watch") | // adds a "purge" tab (after "watch") | ||
// -------------------------------------------------------- | // -------------------------------------------------------- | ||
$( function() { | |||
if ( | if ( !$( '#ca-purge' ).length && mw.config.get( 'wgIsArticle' ) ) { | ||
mw.loader.using(['mediawiki.util']).then(function() { | |||
mw.util.addPortletLink( | |||
'p-cactions', | |||
mw.util.getUrl( mw.config.get( 'wgPageName' ) ) + '?action=purge', | |||
mw.config.get( 'skin' ) == 'vector' ? 'Purge' : '*', | |||
'ca-purge', | |||
'Purge the server cache of this page', | |||
'*' | |||
} | ); | ||
}); | |||
} | |||
}); | }); | ||
// | // |
Latest revision as of 19:20, June 20, 2020
// -------------------------------------------------------- // addPurge // adds a "purge" tab (after "watch") // -------------------------------------------------------- $( function() { if ( !$( '#ca-purge' ).length && mw.config.get( 'wgIsArticle' ) ) { mw.loader.using(['mediawiki.util']).then(function() { mw.util.addPortletLink( 'p-cactions', mw.util.getUrl( mw.config.get( 'wgPageName' ) ) + '?action=purge', mw.config.get( 'skin' ) == 'vector' ? 'Purge' : '*', 'ca-purge', 'Purge the server cache of this page', '*' ); }); } }); //