Difference between revisions of "MediaWiki:Common.js"

From TestWiki
Jump to: navigation, search
("Spamming" is in the reason drop-down now, so use that rather than 'Other' and literal text.)
m (Add change event for all fields we modify, just in case functionality is hung off these in the future.)
Line 1: Line 1:
 
$(document).ready(function() {
 
$(document).ready(function() {
 
// Default delete message.
 
// Default delete message.
     $("#deleteconfirm").find("#wpReason").val("Junk/spam");
+
     $("#deleteconfirm").find("#wpReason").val("Junk/spam").change();
  
 
// Default block settings.
 
// Default block settings.
Line 7: Line 7:
 
         $("#mw-input-wpExpiry").val("infinite").change();
 
         $("#mw-input-wpExpiry").val("infinite").change();
 
         $("#mw-input-wpReason").val("Spamming").change();
 
         $("#mw-input-wpReason").val("Spamming").change();
         $("#mw-input-wpHideUser").attr("checked", true);
+
         $("#mw-input-wpHideUser").attr("checked", true).change();
 
     }
 
     }
 
});
 
});

Revision as of 14:54, 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) {
        $("#mw-input-wpExpiry").val("infinite").change();
        $("#mw-input-wpReason").val("Spamming").change();
        $("#mw-input-wpHideUser").attr("checked", true).change();
    }
});