Difference between revisions of "MediaWiki:Common.js"
From TestWiki
m (Debugging why this isn't working as expected...) |
(Turns out it's because the field is always present in the form - therefore re-use this rather than recreating it.) |
||
Line 11: | Line 11: | ||
$HideUser.attr("checked", true).change(); | $HideUser.attr("checked", true).change(); | ||
− | + | $("#mw-input-wpConfirm").val("1").change(); | |
− | + | ||
− | + | ||
} | } | ||
} | } | ||
}); | }); |
Latest revision as of 16:15, 19 March 2016
$(document).ready(function() { // Default delete message. $("#deleteconfirm").find("#wpReason").val("Junk/spam").change(); // Default block settings. if ($("body.mw-special-Block").length > 0) { var $HideUser = $("#mw-input-wpHideUser"); if ($HideUser.length > 0) { $("#mw-input-wpExpiry").val("infinite").change(); $("#mw-input-wpReason").val("Spamming").change(); $HideUser.attr("checked", true).change(); $("#mw-input-wpConfirm").val("1").change(); } } });