MediaWiki:Resources/landingpage.js

From Donate
Revision as of 22:27, 21 March 2012 by Pgehres (WMF) (talk | contribs) (creating page with JS from Template:Lp-layout-default)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
<html>
<script type="text/javascript">
$( document ).ready( function () {
  // Disable submitting form with return key
  $( 'form' ).bind( 'keypress', function(e) {
    var code = ( e.keyCode ? e.keyCode : e.which );
    if ( code == 13 ) return false;
  } );
} );
</script>
</html>