From 280f3f7a3eaffbf50c14431dfa159ae0e1acfca4 Mon Sep 17 00:00:00 2001 From: greg Date: Mon, 4 Jun 2018 16:48:09 -0400 Subject: [PATCH] Override control-s and command-s to auto-recompile --- src/app.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/app.js b/src/app.js index 80baedf98b..cf79bbbb05 100644 --- a/src/app.js +++ b/src/app.js @@ -235,6 +235,14 @@ Please make a backup of your contracts and start using http://remix.ethereum.org return 'Are you sure you want to leave?' } + // Run the compiler instead of trying to save the website + $(window).keydown(function (e) { + if ((e.metaKey || e.ctrlKey) && e.keyCode == 83) { /*ctrl+s or command+s*/ + e.preventDefault(); + runCompiler(); + } + }); + function importExternal (url, cb) { self._components.compilerImport.import(url, (loadingMsg) => {