User:Kiteretsu/confirmationRollback-mobile.js: Difference between revisions
Jump to navigation
Jump to search
Created for personal use and properly use of rollback tool with conformation reverting to stop abuse. |
m Tsukushi moved page User:Infinityboy7/confirmationRollback-mobile.js to User:Kiteretsu/confirmationRollback-mobile.js without leaving a redirect: Uncontroversial move: User renamed. |
(One intermediate revision by one other user not shown) | |
(No difference)
|
Latest revision as of 02:14, 30 August 2024
/********************************************************************
** ***WARNING: GLOBAL GADGET FILE*** **
** Any changes to this file will affect many users. Please discuss **
** changes on the talk page or at [[WP:VPT]] before editing. **
********************************************************************/
//<nowiki>
(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();
});
}
}());
//</nowiki>