Jump to content

User:Anomie/nosubmitsummary.js

From Wikipedia, the free encyclopedia
This is the current revision of this page, as edited by Anomie (talk | contribs) at 18:19, 12 February 2012 (jQuery-ize). The present address (URL) is a permanent link to this version.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
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 you want to use this script, simply add the following line to your monobook.js:
 
importScript('User:Anomie/nosubmitsummary.js'); // Linkback: [[User:Anomie/nosubmitsummary.js]]
 
* (Please keep the comment so I can see how many people use this).
*/

/* Don't submit when hitting enter in the summary field */
$(document).ready(function(){
    $('input#wpSummary').keypress(function(e){
        if(e.which==13) e.preventDefault();
    });
});