diff --git a/js/demo.js b/js/demo.js index 85b7979..bb1d0a3 100644 --- a/js/demo.js +++ b/js/demo.js @@ -889,7 +889,10 @@ window.demoInterface = { } } }, + didInit: false, init (screen) { + if (this.didInit) return + this.didInit = true this.terminal = new ScrollingTerminal(screen) this.shell = new DemoShell(this.terminal, true) } diff --git a/js/term_conn.js b/js/term_conn.js index 35bda54..b5fb962 100644 --- a/js/term_conn.js +++ b/js/term_conn.js @@ -132,7 +132,7 @@ window.Conn = class TermConnection extends EventEmitter { if (typeof window.demoInterface === 'undefined') { alert('Demoing non-demo build!') // this will catch mistakes when deploying to the website } else { - demoInterface.init(screen) + demoInterface.init(this.screen) showPage() } return