MediaWiki:Gadget-CheckUserMenu.js: Difference between revisions
From SmashWiki, the Super Smash Bros. wiki
Jump to navigationJump to search
mNo edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
$(function() { | $(function() { | ||
if (mw.config.get('wgCanonicalSpecialPageName') === 'CheckUser') { | if (mw.config.get('wgCanonicalSpecialPageName') === 'CheckUser') { | ||
$('#checkreason').replaceWith('<select id="checkreason" name="reason" style="width: | $('#checkreason').replaceWith('<select id="checkreason" name="reason" style="font-size:100%;width:100%;max-width:50em;height:31.5px"><option value="" selected="selected">Please select a reason...</option><option value="Routine new user check">Routine new user check</option><option value="Suspected sockpuppet account">Suspected sockpuppet account</option><option value="Matching a vandal account">Matching a vandal account</option><option value="Other">Other</option></select>'); | ||
$('#checkreason').change(function() { | $('#checkreason').change(function() { | ||
if ($('#checkreason').val() == 'Other') | if ($('#checkreason').val() == 'Other') | ||
$('#checkreason').replaceWith('<input id="checkreason" name="reason" | $('#checkreason').replaceWith('<input id="checkreason" name="reason" style="font-size:98.7%;width:98%;max-width:50em;height:25.5px" maxlength="150" value=""/>'); | ||
}); | }); | ||
} | } | ||
}); | }); |
Latest revision as of 09:06, August 3, 2023
/* Add a drop-down menu for Special:CheckUser reasons */
$(function() {
if (mw.config.get('wgCanonicalSpecialPageName') === 'CheckUser') {
$('#checkreason').replaceWith('<select id="checkreason" name="reason" style="font-size:100%;width:100%;max-width:50em;height:31.5px"><option value="" selected="selected">Please select a reason...</option><option value="Routine new user check">Routine new user check</option><option value="Suspected sockpuppet account">Suspected sockpuppet account</option><option value="Matching a vandal account">Matching a vandal account</option><option value="Other">Other</option></select>');
$('#checkreason').change(function() {
if ($('#checkreason').val() == 'Other')
$('#checkreason').replaceWith('<input id="checkreason" name="reason" style="font-size:98.7%;width:98%;max-width:50em;height:25.5px" maxlength="150" value=""/>');
});
}
});