CURRENT MISSION: Conclude the 2026 soyjak.party hack page, aswell as any pages relating to it, such as the Summer 2026 Crisis page.
Update Quotecord with any relevant info. See the blackboard for more info.

User:SprokemowerMan/common.js: Difference between revisions

From Soyjak Wiki, the free ensoyclopedia
Jump to navigationJump to search
April Fool (talk | contribs)
No edit summary
Tag: Reverted
April Fool (talk | contribs)
m Reverted previous edit(s)
Tags: Replaced Rollback Reverted
Line 1: Line 1:
// reserved for javascript tests
// reserved for javascript tests
//Mass rollback function
//Written by [[:en:User: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)
jQuery(document).ready(function ($) {
    function rollbackEverything() {
        for (var i in document.links) {
            if (document.links[i].href.indexOf('action=rollback') != -1) {
                window.open(document.links[i].href);
            }
        }
    }
    function rollbackEverythingButton() {
        var hasRollback = $("span.mw-rollback-link");
        if (hasRollback[0] && (document.title.indexOf("User contributions") !== -1) ) {
            var link = mw.util.addPortletLink(
                'p-cactions',
                '#',
                'rollback all',
                'ca-rollbackeverything',
                'rollback all edits displayed here'
            );
            $(link).click(function (e) {
                e.preventDefault();
                rollbackEverything();
            });
        }
    }
    mw.loader.using(['mediawiki.util'], function() {
        rollbackEverythingButton();
    });
});

Revision as of 04:45, 1 April 2025

// reserved for javascript tests