- Portals
- The Current Year
- ED in the News
- Admins
- Help ED Rebuild
- Archive
- ED Bookmarklet
- Donate Bitcoin
Contact an admin on Discord or EDF if you want an account. Also fuck bots.
User:Oblique/rollback all.js: Difference between revisions
Jump to navigation
Jump to search
imported>Oblique No edit summary |
imported>Oblique No edit summary |
(No difference)
|
Revision as of 06:34, 19 November 2011
//<nowiki> Reverts all contribs of a single user with the push of a button. Makes vandalism even more pointless.
function rollbackEverythingButton() {
var hasRollback = getElementsByClassName(document, "span", "mw-rollback-link");
if (hasRollback[0] && wgCanonicalSpecialPageName == 'Contributions' ) {
addPortletLink('p-cactions', 'javascript:rollbackEverything()', "Rollback all", "ca-rollbackeverything", "Rollback all top edits displayed");
}
}
YAHOO.util.Event.onContentReady('p-cactions', rollbackEverythingButton);
function rollbackEverything() {
for (var i in document.links) {
if (document.links[i].href.indexOf('action=rollback') != -1) {
window.open(document.links[i].href+'&bot=1');
}
}
}
//</nowiki>