From f3864763931ef8105729281738dc7a85f7fe2cda Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Wed, 7 Sep 2016 19:52:31 +0100 Subject: [PATCH] Support disabling automatic code compilation --- index.html | 1 + src/app.js | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/index.html b/index.html index 038bada604..92182f0dc4 100644 --- a/index.html +++ b/index.html @@ -91,6 +91,7 @@
+
diff --git a/src/app.js b/src/app.js index f9cae3c84b..fab4062997 100644 --- a/src/app.js +++ b/src/app.js @@ -436,6 +436,12 @@ var run = function () { var renderer = new Renderer(editor, executionContext.web3(), updateFiles, udapp, executionContext, formalVerification.event, compiler.event); // eslint-disable-line + var autoCompile = document.querySelector('#autoCompile').checked; + + document.querySelector('#autoCompile').addEventListener('change', function () { + autoCompile = document.querySelector('#autoCompile').checked; + }); + var previousInput = ''; var compileTimeout = null; @@ -449,6 +455,11 @@ var run = function () { return; } previousInput = input; + + if (!autoCompile) { + return; + } + if (compileTimeout) { window.clearTimeout(compileTimeout); }