User:Blablubbs/twinkle-blockreasons.js

// the below initially borrowed and then adapted from ST47 Special:Permalink/976059118 mw.loader.using( ['ext.gadget.Twinkle'], function {	Twinkle.block.blockPresetsInfo['compromised'] = {		autoblock: true,		nocreate: true,		disabletalk: false,		noemail: false,		expiry: 'infinity',	    forRegisteredOnly: true,	    reason: 'Likely compromised account',	    templateName: 'uw-compblock',	    suppressArticleInSummary: true,	};	Twinkle.block.blockPresetsInfo['cubl-ntpa'] = {		autoblock: true,		nocreate: true,		disabletalk: true,		noemail: false,		expiry: 'infinity',	    forRegisteredOnly: true,	    reason: ,	    templateName: 'checkuserblock-account',	};	Twinkle.block.blockPresetsInfo['cubl-ntpa-nem'] = {		autoblock: true,		nocreate: true,		disabletalk: true,		noemail: true,		expiry: 'infinity',	    forRegisteredOnly: true,	    reason: ,	    templateName: 'checkuserblock-account',	};	Twinkle.block.blockPresetsInfo['lta-user'] = {		autoblock: true, nocreate: true, disabletalk: true, noemail: true, expiry: 'infinity', forRegisteredOnly: true, reason: 'Long-term abuse', templateName: 'uw-blockindef', suppressArticleInSummary: true, };	Twinkle.block.blockPresetsInfo['multiple-accounts'] = { autoblock: true, nocreate: true, disabletalk: false, noemail: false, expiry: 'infinity', forRegisteredOnly: true, reason: 'Abusing multiple accounts', templateName: 'uw-sockblock', summary: 'You have been blocked from editing for abusing multiple accounts', suppressArticleInSummary: true, };	Twinkle.block.blockPresetsInfo['multiple-accounts-hard'] = { autoblock: true, nocreate: true, disabletalk: true, noemail: true, expiry: 'infinity', forRegisteredOnly: true, reason: 'Abusing multiple accounts', templateName: 'uw-sockblock', summary: 'You have been blocked from editing for abusing multiple accounts', suppressArticleInSummary: true, };	Twinkle.block.blockPresetsInfo['nothere-hard'] = { autoblock: true, nocreate: true, disabletalk: true, noemail: true, expiry: 'infinity', forRegisteredOnly: true, reason: 'Clearly not here to build an encyclopedia', templateName: 'uw-nothereblock', summary: 'You have been indefinitely blocked from editing because it appears that you are not here to build an encyclopedia', suppressArticleInSummary: true, };	Twinkle.block.blockPresetsInfo['uw-spambotblock'] = { autoblock: true, nocreate: true, disabletalk: false, noemail: false, expiry: 'infinity', forRegisteredOnly: true, reason: 'Spam-only account: Spambot', suppressArticleInSummary: true, };	Twinkle.block.blockPresetsInfo['voa-hard'] = { autoblock: true, expiry: 'infinity', forRegisteredOnly: true, nocreate: true, noemail: true, disabletalk: true, templateName: 'uw-voablock', reason: 'Vandalism-only account', summary: 'You have been indefinitely blocked from editing because your account is being used only for vandalism' },	Twinkle.block.blockPresetsInfo['lta-ip'] = { autoblock: true, nocreate: true, hardblock: true, disabletalk: true, expiry: '72 hours', forAnonOnly: true, reason: 'Long-term abuse', templateName: 'uw-blocknotalk', suppressArticleInSummary: true, };	Twinkle.block.blockPresetsInfo['lta-ip-2w'] = { autoblock: true, nocreate: true, hardblock: false, disabletalk: true, expiry: '2 weeks', forAnonOnly: true, reason: 'Long-term abuse', templateName: 'uw-blocknotalk', suppressArticleInSummary: true, };

Twinkle.block.blockGroups.unshift(		{label: "Custom", list: [			{label: "Checkuserblock-account (TPA)", value: 'cubl-ntpa'},			{label: "Checkuserblock-account (TPA EMD)", value: 'cubl-ntpa-nem'},			{label: "NOTHERE (indef, TPA EMD)", value: 'nothere-hard'},			{label: "Abusing multiple accounts (indef)", value: 'multiple-accounts'},			{label: "Abusing multiple accounts (indef, TPA EMD)", value: 'multiple-accounts-hard'},			{label: "Vandalism-only account (indef, TPA EMD)", value: 'voa-hard'},			{label: "Spambot", value: 'uw-spambotblock'},			{label: "Compromised account", value: 'compromised'},			{label: "LTA User (indef hard)", value: 'lta-user'},			{label: "LTA IP (3 days hard)", value: 'lta-ip'},			{label: "LTA IP (2 weeks soft)", value: 'lta-ip-2w'},		]}	); Twinkle.block.blockGroups[1]['list'][3]['selected'] = true; Twinkle.block.callback.issue_template = function twinkleblockCallbackIssueTemplate(formData) { var userTalkPage = 'User_talk:' + mw.config.get('wgRelevantUserName'); var params = $.extend(formData, {			messageData: Twinkle.block.blockPresetsInfo[formData.template],			reason: Twinkle.block.field_template_options.block_reason,			disabletalk: Twinkle.block.field_template_options.notalk,			noemail: Twinkle.block.field_template_options.noemail_template,			nocreate: Twinkle.block.field_template_options.nocreate_template		}); Morebits.wiki.actionCompleted.redirect = userTalkPage; Morebits.wiki.actionCompleted.notice = 'Actions complete, loading user talk page in a few seconds'; var wikipedia_page = new Morebits.wiki.page(userTalkPage, 'User talk page modification'); wikipedia_page.setCallbackParameters(params); wikipedia_page.setFollowRedirect(false); wikipedia_page.load(Twinkle.block.callback.main); }; });