MediaWiki:Gadget-CheckUserMenu.js

From the Super Mario Wiki, the Mario encyclopedia
Jump to navigationJump to search

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
/* 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=""/>');
		});
	}
});