MediaWiki:Gadget-Purge.js: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
m +mw.util.getUrl
Riga 3:
*/
$( function () {
if ( document.getElementById$( '#ca-history' ).length ) {
var portletLink = mw.util.addPortletLink(
'p-cactions',
'#',
mw.util.getUrl( null, { action: 'purge' } ),
'Purge',
'ca-purge',
Riga 12:
'*'
);
$( portletLink ).click( function ( e ) {
e.preventDefault();
new mw.Api().post( {
mw.util.getUrl( null, { action: 'purge' } ),
titles: mw.config.get( 'wgPageName' )
} ).then(
function () {
location.reload();
}, function () {
mw.notify( 'Errore purge', { type: 'error' } );
}
);
} );
}
} );
0

contributi