File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1308,6 +1308,7 @@ if (btn) btn.addEventListener("click", event => {
1308
1308
window . open ( url , '_blank' ) ;
1309
1309
} ) ;
1310
1310
1311
+ // Screenshot button
1311
1312
btn = document . getElementById ( "screenshot" ) ;
1312
1313
if ( btn ) btn . addEventListener ( "click" , event => {
1313
1314
getInstalledApps ( false ) . then ( ( ) => {
@@ -1357,3 +1358,14 @@ if (btn) btn.addEventListener("click",event=>{
1357
1358
}
1358
1359
} ) ;
1359
1360
} ) ;
1361
+
1362
+ // Open terminal button
1363
+ if ( Espruino . Core . Terminal )
1364
+ Espruino . Core . Terminal . OVERRIDE_CONTENTS = "Click here and type to communicate with Bangle.js" ;
1365
+ btn = document . getElementById ( "terminalEnable" ) ;
1366
+ if ( btn ) btn . addEventListener ( "click" , event => {
1367
+ document . getElementById ( "terminalEnable" ) . remove ( ) ;
1368
+ document . querySelector ( ".editor__canvas" ) . style . display = "inherit" ;
1369
+ Comms . on ( "data" , x => Espruino . Core . Terminal . outputDataHandler ( x ) )
1370
+ Espruino . Core . Terminal . setInputDataHandler ( function ( d ) { Comms . write ( d ) ; } )
1371
+ } ) ;
You can’t perform that action at this time.
0 commit comments