User:Vermont/global.js

From Meta, a Wikimedia project coordination 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.
if ( (/^enwiki$/.test(mw.config.get("wgDBname")) === false) && (/^simplewiki$/.test(mw.config.get("wgDBname")) === false) )
	mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Xiplus/TwinkleGlobal.js&action=raw&ctype=text/javascript');
else
	mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Tks4Fish/TwinkleGlobalSRG.js&action=raw&ctype=text/javascript');
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:DannyS712/Easy-link.js&action=raw&ctype=text/javascript');
mw.loader.load('//tools-static.wmflabs.org/meta/scripts/pathoschild.ajaxsysop.js');
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Quentinv57/HideButtonsFromNonGsProjects.js&action=raw&ctype=text/javascript');
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Writ_Keeper/Scripts/massRollback.js&action=raw&ctype=text/javascript');
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Vermont/sidebar.js&action=raw&ctype=text/javascript');
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:WhitePhosphorus/js/active sysops.js&action=raw&ctype=text/javascript');
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Enterprisey/link-deleted-revs.js&action=raw&ctype=text/javascript');
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Enterprisey/links-in-logs.js&action=raw&ctype=text/javascript');
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:GeneralNotability/InvestorGoat.js&action=raw&ctype=text/javascript');
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Linedwell/centralauthlink.js&action=raw&ctype=text/javascript');
mw.loader.load('//wikidata.org/w/index.php?title=User:Yair rand/WikidataInfo.js&action=raw&ctype=text/javascript');
mw.loader.load( '//en.wikipedia.org/w/index.php?title=User:Chlod/Scripts/GoToTitle.js&action=raw&ctype=text/javascript' ); 
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Writ_Keeper/Scripts/massRollback.js&action=raw&ctype=text/javascript');
mw.loader.load("https://en.wikipedia.org/w/index.php?title=User:Awesome_Aasim/noeditredlinks.js&oldid=1174844900&action=raw&ctype=text/javascript");
// Backlink: [[User:Chlod/Scripts/GoToTitle.js]]

// CULogHelper
// by [[:w:en:User:Amalthea]], forked by [[:w:en:User:L235]]
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:L235/culoghelper-personaltesting.js&action=raw&ctype=text/javascript');

// CentralAuth, Proxy check and WHOIS link
// by [[User:Linedwell]], modified by [[User:Tks4Fish]]
mw.loader.load("//meta.wikimedia.org/w/index.php?title=User:Tks4Fish/CAWhoisProxy.js&action=raw&ctype=text/javascript");

// Closer for SRG
// by [[User:DannyS712]]
mw.loader.load("//meta.wikimedia.org/w/index.php?title=User:DannyS712/SRG.js&action=raw&ctype=text/javascript");

// Script for redirecting Special:CentralAuth pages on all wikis to the metawiki one
// by [[User:Tks4Fish]]
mw.loader.load("//meta.wikimedia.org/w/index.php?title=User:Tks4Fish/CARedirect.js&action=raw&ctype=text/javascript");

mw.loader.load("//meta.wikimedia.org/w/index.php?title=User:WhitePhosphorus/js/GS Rationale.js&action=raw&ctype=text/javascript");

// Custom settings for [[User:WhitePhosphorus/js/all-in-one.js]]
mw.loader.load( '//meta.wikimedia.org/w/index.php?title=User:WhitePhosphorus/js/all-in-one.js&action=raw&ctype=text/javascript');
if (typeof(p4js_all_in_one) === 'undefined') p4js_all_in_one = {};
p4js_all_in_one.packages = {
    // default
    "Vandalism": {
        tracingedits: {
            duration: 3600,
            indefregistered: true,
        },
        rollback: {
            bot: true,
            showname: true,
        },
        block: {
            enabled: true,
            duration: "31 hours",
            indefregistered: true,
            reason: "Vandalism",
            autoblock: true,
            hardblock: false,
            create: true,
            talk: false,
            mail: false,
            hidename: false,
        },
        pagedelete: {
            enabled: true,
            reason: "Vandalism",
        },
        revisiondelete: {
            enabled: false,
            content: true,
            summary: true,
            username: false,
            reason: "Vandalism",
            oversight: false,
        },
    },
    "GS - Vandalism": {
        tracingedits: {
            duration: 7200,
            indefregistered: true,
        },
        rollback: {
            bot: true,
            showname: true,
        },
        block: {
            enabled: true,
            duration: "31 hours",
            indefregistered: true,
            reason: "Vandalism ([[m:Global sysop|global sysop]] action",
            autoblock: true,
            hardblock: false,
            create: true,
            talk: false,
            mail: false,
            hidename: false,
        },
        pagedelete: {
            enabled: true,
            reason: "Vandalism ([[m:Global sysop|global sysop]] action",
        },
        revisiondelete: {
            enabled: false,
            content: true,
            summary: true,
            username: false,
            reason: "Vandalism ([[m:Global sysop|global sysop]] action",
            oversight: false,
        },
    },
    // package
    "LTA-hide": {
        tracingedits: {
            duration: 7200,
            indefregistered: true,
        },
        rollback: {
            bot: true,
            showname: false,
        },
        block: {
            enabled: true,
            duration: "31 hours",
            indefregistered: true,
            reason: "Long-term abuse",
            autoblock: true,
            hardblock: false,
            create: true,
            talk: true,
            mail: true,
            hidename: false,
        },
        pagedelete: {
            enabled: true,
            reason: "Long-term abuse",
        },
        revisiondelete: {
            enabled: true,
            content: true,
            summary: true,
            username: true,
            reason: "Hiding vandalism/attack",
            oversight: false,
        },
    },
    // This name will appear in the select box. You may want to use the abbreviation of LTA to indicate what it targets.
    "LTA-general": {
        tracingedits: {
            duration: 7200, // Only deal with the edits made no earlier than this time (in seconds) ago. 'inf' for everything.
            indefregistered: true, // If true, the above duration only apply to IP users. When you input a registered username, the duration will be set to indef.
        },
        rollback: {
            bot: true, // If true, your rollbacks will not appear in recent changes, if you have `markbotedits` right.
            showname: true, // If false, the villain's username won't appear in your rollback summary. Only use it when the username needs to be hidden.
        },
        block: {
            enabled: true, // If false, you will not block the villain in default settings.
            duration: "48 hours", // You can set it to everything as you do in the block interface.
            indefregistered: true, // If true, the above duration only apply to IP users. When you input a registered username, the duration will be set to indef.
            reason: "Long-term abuse", // The reason you used to fill in the block interface.
            autoblock: true, // Automatically block the last IP address used by this user, and any subsequent IP addresses they try to edit from. Not applicable to IP users.
            hardblock: false, // Prevent logged-in users from editing from this IP address. Not applicable to registered users.
            create: true, // Block account creation.
            talk: true, // Block talk page editing.
            mail: true, // Block email interface access. Not applicable to IP users.
            hidename: false, // If true, hide username from the public logs. Only applicable if you have `hideuser` right, e.g. be an oversighter.
        },
        pagedelete: {
            enabled: true, // If false, you will not delete pages created by the villain in default settings.
            reason: "Vandalism: Long-term abuse", // The reason you used to fill in the delete interface.
        },
        revisiondelete: {
            enabled: false, // If true, you will delete all the revisions the villain edited.
            content: true, // Whether to hide the revision content or not.
            summary: true, // Whether to hide the summary or not.
            username: false, // Whether to hide the username or not.
            reason: "Long-term abuse", // The reason you used to fill in the revision delete interface.
            oversight: false, // If true, suppress the edits instead of revision deletion. Only applicable if you have `suppressrevision` right, e.g. be an oversighter.
        },
    },
    // package
    "Spambot": {
        tracingedits: {
            duration: 3600,
            indefregistered: true,
        },
        rollback: {
            bot: true,
            showname: true,
        },
        block: {
            enabled: true,
            duration: "31 hours",
            indefregistered: true,
            reason: "Spamming/Spambot",
            autoblock: true,
            hardblock: false,
            create: true,
            talk: false,
            mail: false,
            hidename: false,
        },
        pagedelete: {
            enabled: true,
            reason: "Spam",
        },
        revisiondelete: {
            enabled: false,
            content: false,
            summary: false,
            username: false,
            reason: "Blatant offensive materials",
            oversight: false,
        },
    },
        // package
    "GS - Spambot": {
        tracingedits: {
            duration: 3600,
            indefregistered: true,
        },
        rollback: {
            bot: true,
            showname: true,
        },
        block: {
            enabled: true,
            duration: "31 hours",
            indefregistered: true,
            reason: "Spam ([[m:Global sysop|global sysop]] action",
            autoblock: true,
            hardblock: false,
            create: true,
            talk: false,
            mail: false,
            hidename: false,
        },
        pagedelete: {
            enabled: true,
            reason: "Spam  ([[m:Global sysop|global sysop]] action",
        },
        revisiondelete: {
            enabled: false,
            content: false,
            summary: false,
            username: false,
            reason: "Blatant offensive materials  ([[m:Global sysop|global sysop]] action",
            oversight: false,
        },
    },
// package
    "Translation": {
        tracingedits: {
            duration: 3600,
            indefregistered: true,
        },
        rollback: {
            bot: true,
            showname: true,
        },
        block: {
            enabled: false,
            duration: "31 hours",
            indefregistered: true,
            reason: "Translation vandalism",
            autoblock: true,
            hardblock: false,
            create: true,
            talk: false,
            mail: false,
            hidename: false,
        },
        pagedelete: {
            enabled: true,
            reason: "Not a real translation",
        },
        revisiondelete: {
            enabled: false,
            content: false,
            summary: false,
            username: false,
            reason: "Blatant offensive materials",
            oversight: false,
        },
    },
    "Abusing multiple accounts": {
        tracingedits: {
            duration: 3600,
            indefregistered: true,
        },
        rollback: {
            bot: true,
            showname: true,
        },
        block: {
            enabled: true,
            duration: "31 hours",
            indefregistered: true,
            reason: "Abusing multiple accounts/sockpuppetry",
            autoblock: true,
            hardblock: false,
            create: true,
            talk: false,
            mail: false,
            hidename: false,
        },
        pagedelete: {
            enabled: false,
            reason: "Sockpuppet",
        },
        revisiondelete: {
            enabled: false,
            content: false, 
            username: false,
            reason: "Blatant offensive materials",
            oversight: false,
        },
    },
};
p4js_all_in_one.default_package = "Vandalism"; // The default package will get selected upon page is rendered.
p4js_all_in_one.suffixes = [") ([[m:Global sysop|global sysop]] action"];
if (typeof(p4js_all_in_one) === 'undefined') p4js_all_in_one = {};
p4js_all_in_one.reasons = {
    block: ["Long-term abuse", "Vandalism-only account", "Spam-only account", "Open proxy", "Vandalism"],
    pagedelete: ["Vandalism", "Spam", "Test page"],
    revisiondelete: ["Blatantly offensive content", "Private information"],
};
// You can select these suffixes to append to your block and (revision) delete rationales.
p4js_all_in_one.suffixes = ["", " ([[m:Global sysops|Global sysop]] action)", ""];

ebPrefs = {
    useAutoWarn   : false,
    displayStatus : false,
    showOnClick   : true,
};
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Tks4Fish/CleanDeleteReasons.js&action=raw&ctype=text/javascript');
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Tks4Fish/massBlock.js&action=raw&ctype=text/javascript');
mw.loader.load('//tools-static.wmflabs.org/meta/scripts/pathoschild.forceltr.js');
(function() {
	
	$(document).ready(function() {
		mw.loader.using( ['mediawiki.util'], function() {
			// show shortcuts if not editing
			if (!mw.config.get('wgEditMessage')) {
				mw.util.addPortletLink("p-navigation", "https://simple.wikipedia.org/wiki/User:Vermont/tasks", "Tasks");
				mw.util.addPortletLink("p-navigation", "https://meta.wikimedia.org/wiki/Steward requests/Miscellaneous", "SRM");
				return;
			}
		});
	});

}());
mw.loader.load('https://meta.wikimedia.org/w/index.php?action=raw&ctype=text/javascript&title=MediaWiki:MoreMenu.import.js');
mw.loader.load("//en.wikipedia.org/w/index.php?title=User:The_Earwig/permalink.js&action=raw&ctype=text/javascript");
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Erwin/stewardlinks.js&action=raw&ctype=text/javascript');
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:PleaseStand/userinfo.js&action=raw&ctype=text/javascript');

//Add link to Meta's CentralAuth to tools when viewing contribs page
$.when( mw.loader.using( 'mediawiki.util' ), $.ready ).then( function () {
	if(mw.config.get("wgCanonicalSpecialPageName") == "Contributions" | "CentralAuth")
	{
		mw.util.addPortletLink(
			'p-tb',
			'https://meta.wikimedia.org/wiki/Special:CentralAuth/' + window.location.href.substr(window.location.href.indexOf('Special:Contributions/') + 22),
			'CentralAuth',
			't-CentralAuth',
			'View on Meta CentralAuth',
			'm',
			'#t-print'
		);
	}
} );


// Tagger for eg. Speedy deletions
// by [[m:user:Hoo man]] <https://meta.wikimedia.org/wiki/User:Hoo_man/tagger.js>
// [[File:Hoo man/tagger.js]]
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Hoo_man/tagger.js&action=raw&ctype=text/javascript');


//<nowiki>
if( typeof window.taggerConfig === 'undefined' ) {
	window.taggerConfig = {};
}
/*global taggerConfig*/
taggerConfig.tags = [];
taggerConfig.editSummary = [];
taggerConfig.tags[1] = '{{delete|No meaningful content}}';
taggerConfig.editSummary[taggerConfig.tags[1]] = '{{delete}} - no meaningful content';
taggerConfig.tags[2] = '{{delete|Off-topic.}}';
taggerConfig.editSummary[taggerConfig.tags[2]] = 'Tagging for deletion - off-topic page.';
taggerConfig.tags[3] = '{{delete|Spam.}}';
taggerConfig.editSummary[taggerConfig.tags[3]] = '{{delete}} - Spam';
taggerConfig.tags[4] = '{{delete|Vandalism.}}';
taggerConfig.editSummary[taggerConfig.tags[4]] = '{{delete}} - Vandalism';
taggerConfig.tags[5] = '{{delete|Blanked by author.}}';
taggerConfig.editSummary[taggerConfig.tags[5]] = '{{delete}} - Blanked by author.';
taggerConfig.tags[6] = '{{delete|Copyright violation}}';
taggerConfig.editSummary[taggerConfig.tags[6]] = '{{delete}} - copyright violation';
taggerConfig.tags[7] = '{{delete}}';
taggerConfig.editSummary[taggerConfig.tags[7]] = '{{delete}} - plain';
taggerConfig.tags.other = 'This is used for the option you have to select to be able to insert a custom template';
//</nowiki>

// rollback summaries
$(document).ready(function(){
    var rollbackPrompt=function(ev){
        var summary = prompt("Enter rollback summary:", "<use default>");
        if(summary === null || summary === "") {
            ev=ev || window.event;
            if(ev.preventDefault) ev.preventDefault();
            if(ev.stopPropagation) ev.stopPropagation();
            ev.returnValue = false;
            ev.cancelBubble = true;
            return false;
        }
        if(summary != "<use default>")
            this.href = this.href.replace("?", "?summary=" + encodeURIComponent(summary) + "&");
        return true;
    };

    var links=document.getElementById('content').getElementsByTagName('a');
    for(var i=links.length-1; i>=0; i--){
        if(/[?&]action=rollback([&#]|$)/.test(links[i].href))
            links[i].onclick=rollbackPrompt;
    }

});