|
|
@ -67,7 +67,11 @@ window.Conn = function (screen) { |
|
|
|
|
|
|
|
|
|
|
|
function doSend (message) { |
|
|
|
function doSend (message) { |
|
|
|
if (_demo) { |
|
|
|
if (_demo) { |
|
|
|
window.demoInterface.input(message) |
|
|
|
if (typeof demoInterface !== 'undefined') { |
|
|
|
|
|
|
|
demoInterface.input(message) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
console.log(`TX: ${JSON.stringify(message)}`) |
|
|
|
|
|
|
|
} |
|
|
|
return true // Simulate success
|
|
|
|
return true // Simulate success
|
|
|
|
} |
|
|
|
} |
|
|
|
if (xoff) { |
|
|
|
if (xoff) { |
|
|
@ -90,9 +94,12 @@ window.Conn = function (screen) { |
|
|
|
|
|
|
|
|
|
|
|
function init () { |
|
|
|
function init () { |
|
|
|
if (window._demo) { |
|
|
|
if (window._demo) { |
|
|
|
console.log('Demo mode!') |
|
|
|
if (typeof demoInterface === 'undefined') { |
|
|
|
demoInterface.init(screen) |
|
|
|
alert('Demoing non-demo demo!') // this will catch mistakes when deploying to the website
|
|
|
|
showPage() |
|
|
|
} else { |
|
|
|
|
|
|
|
demoInterface.init(screen) |
|
|
|
|
|
|
|
showPage() |
|
|
|
|
|
|
|
} |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|