diff options
Diffstat (limited to 'views/script/settings_global.js')
-rw-r--r-- | views/script/settings_global.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/views/script/settings_global.js b/views/script/settings_global.js index 41332c5..f224ea9 100644 --- a/views/script/settings_global.js +++ b/views/script/settings_global.js @@ -43,20 +43,20 @@ $(document).keydown(function(e) { var id = $(".selected")[0].children[0].children[0].id; if (id === "musicb") { - if (document.getElementById("setting-music").innerText === lang.settings.yes) { - document.getElementById("setting-music").innerText = lang.settings.no; + if (document.getElementById("setting-music").innerText === "1") { + document.getElementById("setting-music").innerText = "0"; require('fs').writeFileSync(homedir + "/.kartik/config/music.txt", "0"); } else { - document.getElementById("setting-music").innerText = lang.settings.yes; + document.getElementById("setting-music").innerText = "1"; require('fs').writeFileSync(homedir + "/.kartik/config/music.txt", "1"); } } if (id === "voice") { - if (document.getElementById("setting-voice").innerText === lang.settings.yes) { - document.getElementById("setting-voice").innerText = lang.settings.no; + if (document.getElementById("setting-voice").innerText === "1") { + document.getElementById("setting-voice").innerText = "0"; require('fs').writeFileSync(homedir + "/.kartik/config/voice.txt", "0"); } else { - document.getElementById("setting-voice").innerText = lang.settings.yes; + document.getElementById("setting-voice").innerText = "1"; require('fs').writeFileSync(homedir + "/.kartik/config/voice.txt", "2"); } } |