User:Vanished user 1929210/MassRollback.js

// Translate from zh:User:Bencmq/Mass rollback.js

mw.loader.using(['mediawiki.util', 'ext.gadget.site-lib'], function {

var hasRollback = $("span.mw-rollback-link"); if (hasRollback[0] && (document.title.indexOf('User contributions') !== -1) ) { $(mw.util.addPortletLink('p-cactions', '#', "Mass Rollback", "ca-rollbackeverything", "Rollback all edits on this page")).click(function (e) {           e.preventDefault;            if (confirm('DO YOU WANT TO ROLLBACK ALL EDITS ON THIS PAGE?')) {                for (var i in document.links) {                    if (document.links[i].href.indexOf('action=rollback') != -1) {                        window.open(document.links[i].href);                    }                }            }        }); } }

});