diff options
author | echo <91651232+exhq@users.noreply.github.com> | 2022-08-28 18:48:13 +0430 |
---|---|---|
committer | echo <91651232+exhq@users.noreply.github.com> | 2022-08-28 18:48:13 +0430 |
commit | 75a6001c6e061607d6686313e3a1e4e580a314c9 (patch) | |
tree | 6805d94bbff65a6c05762f4155556602cdd93e44 /console | |
parent | 098e7367a1e043435b5338a12ebbc971fedc9950 (diff) | |
download | exhq.github.io-75a6001c6e061607d6686313e3a1e4e580a314c9.tar.gz exhq.github.io-75a6001c6e061607d6686313e3a1e4e580a314c9.tar.bz2 exhq.github.io-75a6001c6e061607d6686313e3a1e4e580a314c9.zip |
nea magic
Diffstat (limited to 'console')
-rw-r--r-- | console/build.gradle.kts | 2 | ||||
-rw-r--r-- | console/src/jsMain/kotlin/main.kt | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/console/build.gradle.kts b/console/build.gradle.kts index 61bed6e..c23f20e 100644 --- a/console/build.gradle.kts +++ b/console/build.gradle.kts @@ -21,7 +21,7 @@ kotlin { } sourceSets.named("jsMain") { dependencies { - implementation("com.github.romangraef:neamoe:36374a0") + implementation("com.github.romangraef:neamoe:484bc7c89") implementation(npm("@fontsource/comic-mono", "^4.5.0")) } } 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)) |