MediaWiki:Gadget-Purge.js: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
m 10 versioni importate da w:MediaWiki:Gadget-Purge.js: importo accessorio per eseguire il Purge |
m modifico commento |
||
Riga 1: | Riga 1: | ||
/** |
/** |
||
* Aggiunge |
* Aggiunge la linguetta "Purge". |
||
*/ |
*/ |
||
$( function () { |
$( function () { |
Versione attuale delle 11:30, 11 apr 2017
/**
* Aggiunge la linguetta "Purge".
*/
$( function () {
if ( $( '#ca-history' ).length ) {
var portletLink = mw.util.addPortletLink(
'p-cactions',
'#',
'Purge',
'ca-purge',
'Pulisci la cache',
'*'
);
$( portletLink ).click( function ( e ) {
e.preventDefault();
new mw.Api().post( {
action: 'purge',
titles: mw.config.get( 'wgPageName' )
} ).then(
function () {
location.reload();
}, function () {
mw.notify( 'Errore purge', { type: 'error' } );
}
);
} );
}
} );