User:Eighty5cacao/enterInSummaryPreviews.js

/* Modified from wikipedia:User:Anomie/nosubmitsummary.js When hitting enter in the summary field, preview instead of saving */ $(document).ready(function{   $('input#wpSummary').keypress(function(e){ if(e.which==13) { e.preventDefault; var prBtn = document.getElementById( 'wpPreviewLive' ); // for compatibility with wikipedia:User:Js/ajaxPreview if ( !prBtn ) prBtn = document.getElementById( 'wpPreview' ); if ( prBtn ) prBtn.click; }   }); });