diff options
Diffstat (limited to 'src/shell.html')
-rw-r--r-- | src/shell.html | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/shell.html b/src/shell.html index ff5f6e35..53a4fffb 100644 --- a/src/shell.html +++ b/src/shell.html @@ -63,8 +63,11 @@ }, canvas: document.getElementById('canvas'), setStatus: function(text) { - if (Module.setStatus.interval) clearInterval(Module.setStatus.interval); + if (!Module.setStatus.last) Module.setStatus.last = { time: Date.now(), text: '' }; + if (text === Module.setStatus.text) return; var m = text.match(/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/); + var now = Date.now(); + if (m && now - Date.now() < 30) return; // if this is a progress update, skip it if too soon var statusElement = document.getElementById('status'); var progressElement = document.getElementById('progress'); if (m) { @@ -87,6 +90,6 @@ }; Module.setStatus('Downloading...'); </script> - <script async type='text/javascript'>{{{ SCRIPT_CODE }}}</script> + {{{ SCRIPT }}} </body> </html> |