aboutsummaryrefslogtreecommitdiff
path: root/console/src/jsMain/kotlin/main.kt
diff options
context:
space:
mode:
authorecho <91651232+exhq@users.noreply.github.com>2022-08-28 18:48:13 +0430
committerecho <91651232+exhq@users.noreply.github.com>2022-08-28 18:48:13 +0430
commit75a6001c6e061607d6686313e3a1e4e580a314c9 (patch)
tree6805d94bbff65a6c05762f4155556602cdd93e44 /console/src/jsMain/kotlin/main.kt
parent098e7367a1e043435b5338a12ebbc971fedc9950 (diff)
downloadexhq.github.io-75a6001c6e061607d6686313e3a1e4e580a314c9.tar.gz
exhq.github.io-75a6001c6e061607d6686313e3a1e4e580a314c9.tar.bz2
exhq.github.io-75a6001c6e061607d6686313e3a1e4e580a314c9.zip
nea magic
Diffstat (limited to 'console/src/jsMain/kotlin/main.kt')
-rw-r--r--console/src/jsMain/kotlin/main.kt4
1 files changed, 4 insertions, 0 deletions
diff --git a/console/src/jsMain/kotlin/main.kt b/console/src/jsMain/kotlin/main.kt
index 9be161a..45bdead 100644
--- a/console/src/jsMain/kotlin/main.kt
+++ b/console/src/jsMain/kotlin/main.kt
@@ -1,4 +1,5 @@
import kotlinx.browser.document
+import kotlinx.browser.window
import kotlinx.css.*
import kotlinx.html.dom.append
import kotlinx.html.js.div
@@ -38,6 +39,9 @@ fun main() {
}
console.addLine("Starting stfff")
console.PS1 = { "${console.fileAccessor!!.currentDir.joinToString("/", "/")} > " }
+ if (window.location.hash == "#mobile" || (window.location.hash != "#desktop" && js("'ontouchstart' in document.documentElement") as Boolean)) {
+ console.openMobileKeyboardOnTap()
+ }
console.fileAccessor!!.cd("/home/exhq")
console.rerender()
console.registerCommand(defaultLsCommand("ls", delayBetweenLines = 0.milliseconds))