User:WhitePhosphorus/js/cutMyHand.js
维基百科,自由的 encyclopedia
(function($, mw) {
'use strict';
if (mw.config.get('wgCanonicalSpecialPageName') !== 'Block') {
return;
}
$('.mw-htmlform-submit-buttons .oo-ui-buttonElement-button').click(function(e) {
if ($('#mw-input-wpReason-select .oo-ui-labelElement-label').html() === '其他' &&
$('input[name="wpReason-other"]').val() === '') {
alert('你的封禁理由呢?又手滑了吧?');
e.preventDefault();
}
});
})(jQuery, mediaWiki);