summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/app.js2
-rw-r--r--js/ui/controls.js6
2 files changed, 4 insertions, 4 deletions
diff --git a/js/app.js b/js/app.js
index 64f8bea..729f0d0 100644
--- a/js/app.js
+++ b/js/app.js
@@ -58,7 +58,7 @@ function bind () {
var ae = document.activeElement
if (ae !== shader_textarea && ae !== import_textarea && ae !== username_input && ae !== upload_input) {
- cursor_input.focus()
+ if (is_desktop) cursor_input.focus()
}
if (selecting) {
diff --git a/js/ui/controls.js b/js/ui/controls.js
index 315395d..1ed7179 100644
--- a/js/ui/controls.js
+++ b/js/ui/controls.js
@@ -233,11 +233,11 @@ var controls = (function(){
controls.advanced.memorable = true
controls.advanced.use = function(state){
console.log(state)
- state = document.body.classList.contains('panke')
+ state = typeof state == "boolean" ? state : ! document.body.classList.contains('panke')
if (state)
- document.body.classList.remove('panke')
- else
document.body.classList.add('panke')
+ else
+ document.body.classList.remove('panke')
this.update(state)
}