MediaWiki:Gadget-twinkleblock.js: Difference between revisions
Content deleted Content added
Repo at 3da72fd: apply autofixes 1 (#2058) |
Repo at 001f236: simplify IIFEs (#2074); apply autofixes 3 (#2079); apply autofixes 2 (#2069) |
||
Line 1:
// <nowiki>
▲(function($) {
let api = new mw.Api(), relevantUserName, blockedUserName;
const menuFormattedNamespaces =
menuFormattedNamespaces[0] = '(Article)';
Line 639 ⟶ 638:
oldfield.parentNode.replaceChild(field_block_options.render(), oldfield);
$form.find('fieldset[name="field_64"]').show();
$form.find('[name=pagerestrictions]').select2({
Line 754 ⟶ 752:
statusStr += ' (expires ' + new Morebits.date(Twinkle.block.currentBlockInfo.expiry).calendar('utc') + ')';
}
let infoStr = 'This form will';
Line 832 ⟶ 829:
*/
Twinkle.block.blockPresetsInfo = {
expiry: '31 hours',
forUnregisteredOnly: true,
Line 882 ⟶ 879:
sig: '~~~~'
},
expiry: '1 year',
forUnregisteredOnly: true,
Line 889 ⟶ 886:
sig: null
},
autoblock: true,
expiry: 'infinity',
Line 904 ⟶ 901:
sig: '~~~~'
},
forUnregisteredOnly: true,
expiry: '1 month',
Line 911 ⟶ 908:
reason: '{{spamblacklistblock}} <!-- editor only attempts to add blacklisted links, see [[Special:Log/spamblacklist]] -->'
},
reason: '{{rangeblock}}',
nocreate: true,
Line 918 ⟶ 915:
sig: '~~~~'
},
expiry: '1 year',
forUnregisteredOnly: true,
Line 925 ⟶ 922:
sig: null
},
expiry: '1 year',
forUnregisteredOnly: true,
Line 1,442 ⟶ 1,439:
}
];
Twinkle.block.callback.filtered_block_groups = function twinkleblockCallbackFilteredBlockGroups(group, show_template) {
Line 1,902 ⟶ 1,898:
const userTalkPage = 'User_talk:' + mw.config.get('wgRelevantUserName');
const params =
messageData: Twinkle.block.blockPresetsInfo[formData.template],
reason: Twinkle.block.field_template_options.block_reason,
Line 2,044 ⟶ 2,040:
Twinkle.addInitCallback(Twinkle.block, 'block');
}(
// </nowiki>
|