Difference between revisions of "MediaWiki:Common.js"

From TestWiki
Jump to: navigation, search
(Fix changed IDs in MW upgrade.)
(Finish jQuery update, as this is required to ensure events are triggered properly.)
Line 5: Line 5:
 
// Default block settings.
 
// Default block settings.
 
     if ($("body.mw-special-Block").length > 0) {
 
     if ($("body.mw-special-Block").length > 0) {
         document.getElementById("mw-input-wpExpiry").value = "infinite";
+
         $("#mw-input-wpExpiry").val("infinite").change();
        document.getElementById("mw-input-wpExpiry").onchange();
+
         $("#mw-input-wpReason-other").val("Spamming");
         document.getElementById("mw-input-wpReason-other").value = "Spamming";
+
         $("#mw-input-wpHideUser").attr("checked", true);
         document.getElementById("mw-input-wpHideUser").checked = true;
+
 
     }
 
     }
 
});
 
});

Revision as of 14:52, 19 March 2016

$(document).ready(function() {
// Default delete message.
    $("#deleteconfirm").find("#wpReason").val("Junk/spam");
 
// Default block settings.
    if ($("body.mw-special-Block").length > 0) {
        $("#mw-input-wpExpiry").val("infinite").change();
        $("#mw-input-wpReason-other").val("Spamming");
        $("#mw-input-wpHideUser").attr("checked", true);
    }
});