Jump to content

User:Writ Keeper/Scripts/simpleBlockDefaults.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
if (mw.config.get("wgCanonicalSpecialPageName") == "Block")
{
	mw.loader.using('oojs-ui-core').done(function ()
	{
		$(function ()
		{
			var reasonInput = OO.ui.InputWidget.static.infuse($("#mw-input-wpReason"));
			var expiryInput = OO.ui.InputWidget.static.infuse($("#mw-input-wpExpiry"));
			expiryInput.relativeField.dropdowninput.setValue("24 hours");
			reasonInput.dropdowninput.setValue("[[WP:Blocking policy#Evasion of blocks|Block evasion]]");
		});
	});
}