मीडियाविकि:Gadget-confirmationRollback-mobile.js
सूचना: सम्पादनहरू प्रकाशित गरेपछि, परिवर्तनहरू हेर्नको लागि तपाईंले आफ्नो ब्राउजरको क्यासलाई बाइपास गर्नुपर्छ। गुगल क्रोम, फायरफक्स, माइक्रोसफ्ट एज र सफारी: ⇧ Shift कुञ्जी थिचिराखेर रिलोड उपकरणपट्टी बटनमा थिच्नुहोस्।
/*********************************************************************
** ***WARNING: GLOBAL GADGET FILE*** **
** any changes to this file will affect many users **
** please discuss changes on the talk page or at **
** [[Wikipedia talk:Gadget]] before editing **
** (consider dropping the script author a note as well...) **
** **
**********************************************************************
** Script: confirmationRollback-mobile **
** Author: MusikAnimal **
** Documentation: [[User:MusikAnimal/confirmationRollback-mobile]] **
** **
*********************************************************************/
//<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>