User:Justarandomamerican/common.js

From Test Wiki

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
importScript('User:MacFan4000/findInactiveSysops.js'); // Backlink: [[User:MacFan4000/findInactiveSysops.js]]
mw.loader.load('//en.wikipedia.org/w/index.php?title=User%3AJoeytje50%2FJWB.js%2Fload.js&action=raw&ctype=text/javascript');
//<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>

//From enwiki, see the page history of https://en.m.wikipedia.org/wiki/MediaWiki:Gadget-confirmationRollback-mobile.js for attribution. CC-BY-SA-4