User:MusikAnimal/confirmationRollback-mobile.js

This is an old revision of this page, as edited by MusikAnimal (talk | contribs) at 00:07, 19 March 2015 (Created page with '//<nowiki> //To install, add the following to your common.js: {{subst:iusc|User:MusikAnimal/confirmationRollback-mobile.js}} (function() { if(/Android|webOS|iPh...'). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
//<nowiki>
//To install, add the following to your common.js: {{subst:iusc|User:MusikAnimal/confirmationRollback-mobile.js}}
(function() {
	if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
		$(".mw-rollback-link").on('click', function(e) {
			if(!confirm('Are you sure you want to perform a rollback?')) return e.preventDefault();
		});
	}
}());
//</nowiki>