User:Simon Burchell/common.js

mw.loader.using("mediawiki.user", function {  $('body').delegate('#hotcatCommitForm', 'submit', function  { var submitType = this.wpDiff; if (submitType && (!this.oldid || this.oldid == '0')) { // Switch form submission from diff to save. Don't do this if "oldid" is set to anything but '0': // that indicates an edit conflict with yourself, and in that case you really, really do want // to see the diff! this.wpEditToken.value = mw.user.tokens.get("csrfToken"); submitType.name = submitType.value = 'wpSave'; }   return true; }); });

window.hotcat_del_needs_diff = false; importScript("User:GregU/dashes.js");