MediaWiki:Gadget-twinkleblock.js: Difference between revisions
Content deleted Content added
Amorymeltzer (talk | contribs) Repo at b3b2e20: fix IE bug; remove unused variables |
Amorymeltzer (talk | contribs) Repo at 2b6f9a7: use test, not search, when we're not using the output; Fix for usergroup checking of IPs; better detect bots and turn off autoblock; Don't follow cross-namespace redirect when issuing block template; Remove 10k z-index on select2 dropdowns |
||
Line 106:
bkusers: mw.config.get('wgRelevantUserName'),
ususers: mw.config.get('wgRelevantUserName'),
usprop: 'groupmemberships',
letitle: 'User:' + mw.config.get('wgRelevantUserName')
})
Line 113 ⟶ 114:
Twinkle.block.isRegistered = !!userinfo.userid;
relevantUserName = 'User:' + mw.config.get('wgRelevantUserName');
Twinkle.block.userIsBot = !!userinfo.groupmemberships && userinfo.groupmemberships.map(function(e) {
return e.group;
}).indexOf('bot') !== -1;
} else {
relevantUserName = mw.config.get('wgRelevantUserName');
Twinkle.block.userIsBot = false;
}
if (blockinfo) {
Line 494 ⟶ 503:
mw.util.addCSS(
// Reduce padding
'.select2-results .select2-results__option { padding-top: 1px; padding-bottom: 1px; }' +
Line 1,295 ⟶ 1,302:
// disable autoblock if blocking a bot
if (Twinkle.block.
data.autoblock = false;
}
Line 1,541 ⟶ 1,548:
var wikipedia_page = new Morebits.wiki.page(userTalkPage, 'User talk page modification');
wikipedia_page.setCallbackParameters(params);
wikipedia_page.setFollowRedirect(true, false);
wikipedia_page.load(Twinkle.block.callback.main);
};
Line 1,665 ⟶ 1,672:
};
Twinkle.addInitCallback(Twinkle.block, 'block');
})(jQuery);
|