MediaWiki:Gadget-ConfirmRollbackMobile.js: Difference between revisions

From the Super Mario Wiki, the Mario encyclopedia
Jump to navigationJump to search
(Created page with "//<nowiki> $(".mw-rollback-link a").click(function(event){ if(confirm("Are you sure you want to rollback this edit?")) return; event.preventDefault(); }); //</nowiki>")
 
No edit summary
Line 1: Line 1:
//<nowiki>
//<nowiki>
$(".mw-rollback-link a").click(function(event){
(function() {
if(confirm("Are you sure you want to rollback this edit?")) return;
if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
  event.preventDefault();
$(".mw-rollback-link a").click(function(event){
});
if(confirm("Are you sure you want to perform this rollback?")) return;
event.preventDefault();
});
}
}());
//</nowiki>
//</nowiki>

Revision as of 01:30, January 24, 2019

//<nowiki>
(function() {
	if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
		$(".mw-rollback-link a").click(function(event){
			if(confirm("Are you sure you want to perform this rollback?")) return;
			event.preventDefault();
		});
	}
}());
//</nowiki>