2024-09-17 18:59:38 +02:00
|
|
|
ISOTerminal.addEventListener('ready', function(e){
|
|
|
|
setTimeout( () => this.boot(), 50 ) // because of autorestore.js
|
2024-09-03 18:33:35 +02:00
|
|
|
})
|
|
|
|
|
2024-09-17 18:59:38 +02:00
|
|
|
ISOTerminal.prototype.boot = async function(e){
|
2024-09-03 18:33:35 +02:00
|
|
|
// set environment
|
2024-10-23 18:50:07 +02:00
|
|
|
let env = [
|
|
|
|
`export LINES=${this.opts.rows}`,
|
|
|
|
`export COLUMNS=${this.opts.cols}`,
|
|
|
|
'export BROWSER=1',
|
|
|
|
]
|
2024-09-03 18:33:35 +02:00
|
|
|
for ( let i in document.location ){
|
2024-10-01 19:07:03 +02:00
|
|
|
if( typeof document.location[i] == 'string' ){
|
2024-09-23 18:01:40 +02:00
|
|
|
env.push( 'export '+String(i).toUpperCase()+'="'+decodeURIComponent( document.location[i]+'"') )
|
2024-10-01 19:07:03 +02:00
|
|
|
}
|
2024-09-03 18:33:35 +02:00
|
|
|
}
|
2024-11-15 10:23:06 +01:00
|
|
|
this.worker.create_file("profile.browser", this.convert.toUint8Array( env.join('\n') ) )
|
2024-09-17 18:59:38 +02:00
|
|
|
|
2024-09-16 13:28:28 +02:00
|
|
|
if( this.serial_input == 0 ){
|
2024-09-17 18:59:38 +02:00
|
|
|
if( !this.noboot ){
|
2024-10-04 17:49:15 +02:00
|
|
|
this.send("source /etc/profile # \\o/ FOSS powa!\n")
|
2024-09-17 18:59:38 +02:00
|
|
|
}
|
2024-09-16 13:28:28 +02:00
|
|
|
}
|
|
|
|
|
2024-09-03 18:33:35 +02:00
|
|
|
}
|
|
|
|
|