diff options
author | Minteck <nekostarfan@gmail.com> | 2021-08-05 17:29:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-05 17:29:18 +0200 |
commit | b865b8f6586ffd4554cdfe45c739030afc882acd (patch) | |
tree | 37bcdf6575d8764b7367f34544658886879c0c5e /views/script/settings_load.js | |
parent | 79edea37d15f88f086f7775bbbce64a57535b043 (diff) | |
parent | 7b541bbf2a8d754d26511895801d90f02cdf99f7 (diff) | |
download | kartik-client-b865b8f6586ffd4554cdfe45c739030afc882acd.tar.gz kartik-client-b865b8f6586ffd4554cdfe45c739030afc882acd.tar.bz2 kartik-client-b865b8f6586ffd4554cdfe45c739030afc882acd.zip |
Merge pull request #4 from Minteck-Projects/devel
Branching 21.08
Diffstat (limited to 'views/script/settings_load.js')
-rw-r--r-- | views/script/settings_load.js | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/views/script/settings_load.js b/views/script/settings_load.js index 030a7dd..e2bad80 100644 --- a/views/script/settings_load.js +++ b/views/script/settings_load.js @@ -1,25 +1,25 @@ -info("OptnWindow", "Restoring settings..."); - -if (require('@electron/remote').getCurrentWindow().music) { - if (location.search === "?credits") { - require('electron').ipcRenderer.send('newmusic', kresources.music['title'].file); - } - document.getElementById("setting-music").innerText = "1"; -} else { - document.getElementById("setting-music").innerText = "0"; -} - -if (require('fs').readFileSync(homedir + "/.kartik/config/voice.txt").toString() === "2") { - document.getElementById("setting-voice").innerText = "1"; -} else { - document.getElementById("setting-voice").innerText = "0"; -} - -slang = require('@electron/remote').getCurrentWindow().lp; -langs = require('../lang/languages.json'); - -if (Object.keys(langs).includes(slang)) { - document.getElementById("setting-lang").innerText = langs[slang]; -} else { - document.getElementById("setting-lang").innerText = slang; -} +info("OptnWindow", "Restoring settings...");
+
+if (require('@electron/remote').getCurrentWindow().music) {
+ if (location.search === "?credits") {
+ require('electron').ipcRenderer.send('newmusic', kresources.music['title'].file);
+ }
+ document.getElementById("setting-music").innerText = "1";
+} else {
+ document.getElementById("setting-music").innerText = "0";
+}
+
+if (currentNest.config.voice === true) {
+ document.getElementById("setting-voice").innerText = "1";
+} else {
+ document.getElementById("setting-voice").innerText = "0";
+}
+
+slang = require('@electron/remote').getCurrentWindow().lp;
+langs = require('../lang/languages.json');
+
+if (Object.keys(langs).includes(slang)) {
+ document.getElementById("setting-lang").innerText = langs[slang];
+} else {
+ document.getElementById("setting-lang").innerText = slang;
+}
|