From db5e76880b75c42f3e392ca9bbc26d6cbb0694cd Mon Sep 17 00:00:00 2001 From: LoveEevee Date: Mon, 27 Apr 2020 20:07:43 +0300 Subject: [PATCH] Revert some whitespace changes --- public/src/js/settings.js | 6 ++---- public/src/js/strings.js | 7 +------ public/src/js/titlescreen.js | 3 +-- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/public/src/js/settings.js b/public/src/js/settings.js index d5b7ce6..1f7a9bb 100644 --- a/public/src/js/settings.js +++ b/public/src/js/settings.js @@ -147,12 +147,10 @@ class Settings{ } setLang(lang, noEvent){ strings = lang - var boldFonts = strings.font === "Microsoft YaHei, sans-serif" - loader.screen.style.fontFamily = strings.font - loader.screen.style.fontWeight = boldFonts ? "bold" : "" + loader.screen.style.fontFamily = strings.font + loader.screen.style.fontWeight = boldFonts ? "bold" : "" loader.screen.classList[boldFonts ? "add" : "remove"]("bold-fonts") - if(!noEvent){ pageEvents.send("language-change", lang.id) } diff --git a/public/src/js/strings.js b/public/src/js/strings.js index c4fa550..cca613e 100644 --- a/public/src/js/strings.js +++ b/public/src/js/strings.js @@ -1073,9 +1073,7 @@ var translations = { ko: "가사가있는" } } - var allStrings = {} - function separateStrings(){ for(var j in languageList){ var lang = languageList[j] @@ -1083,9 +1081,8 @@ function separateStrings(){ id: lang } var str = allStrings[lang] - var translateObj = function(obj, name, str){ - if(obj != null && "en" in obj && obj["en"] != null){ + if("en" in obj){ for(var i in obj){ str[name] = obj[lang] || obj.en } @@ -1096,11 +1093,9 @@ function separateStrings(){ } } } - for(var i in translations){ translateObj(translations[i], i, str) } } } - separateStrings() diff --git a/public/src/js/titlescreen.js b/public/src/js/titlescreen.js index ca700c7..aa98e4d 100644 --- a/public/src/js/titlescreen.js +++ b/public/src/js/titlescreen.js @@ -77,8 +77,7 @@ class Titlescreen{ } } setLang(lang, noEvent){ - settings.setLang(lang, true) - + settings.setLang(lang, true) if(this.songId){ return }