MediaWiki:Gadget-confirmationRollback-mobile.js

// By User:MusikAnimal on English Wikipedia // Licensed under CC BY-SA 3.0 (https://creativecommons.org/licenses/by-sa/3.0/) /* // Source: https://en.wikipedia.org/wiki/MediaWiki:Gadget-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) { var linkText = $(e.target).text, count = linkText.match(/\d/) ? linkText.match(/\d+/)[0] : null, message = 'Rollback ' + (count ? count + ' edits' : 'edit') + ' by ' + mw.util.getParamValue('from',e.target.href) + '?'; if(!confirm(message)) return e.preventDefault; });	} });