User:Powers38/monobook.js

//Mass rollback function //Written by John254 //Adapted from User:Mr.Z-man/rollbackSummary.js //Instructions: Selecting the "rollback all" tab when viewing a user's contributions history //will open all rollback links displayed there. (Use with caution) // Adapted to work for Monaco // Original source: http://en.wikipedia.org/wiki/User:John254/mass_rollback.js $(document).ready(function {	var hasRollback = getElementsByClassName(document, "span", "mw-rollback-link");	if (hasRollback[0] && wgCanonicalSpecialPageName && wgCanonicalSpecialPageName == 'Contributions') {		// Add icon		appendCSS('#ca-rollbackall {background:url(http://img24.imageshack.us/img24/271/1248654995arrowcircledo.png) center left no-repeat;padding-left: 19px;} body.masthead-special #page_bar {height: auto !important;}');		var portlet = (skin == 'monobook') ? 'p-cactions' : 'page_bar';		addPortletLink(portlet, 'javascript:rollbackEverything;', 'Rollback all', 'ca-rollbackall', 'Rollback all edits displayed here.');	} }); function rollbackEverything { for (var i in document.links) { if (document.links[i].href.indexOf('action=rollback') != -1) { window.open(document.links[i].href); }   	} }