User:Ainz Ooal Gown/purge-mobile.js

$.when(mw.loader.using(['mediawiki.util', 'mediawiki.api', 'oojs-ui-core','oojs-ui.styles.icons-interactions']), $.ready).then(function { var	purgeBtn = new OO.ui.ButtonWidget({ label: 'Purge', href: mw.util.getUrl( null, { action: 'purge' } ) , icon: 'reload', id: 'node', title: 'Purge the server cache of this page' }); //Append the button to siteNotice div id $("#siteNotice").append(purgeBtn.$element);	$('#node').on( 'click', function (e) { new mw.Api.post( { action: 'purge', titles: mw.config.get( 'wgPageName' ) } ).then(function {			location.reload;		}, function  {			mw.notify( 'Purge failed', { type: 'error' } );		}); e.preventDefault; }); });