From 08b8d829f9514fc2cb7a7e5da88831e2a9e376f4 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 22 Apr 2018 17:28:21 +0900 Subject: ダークモード情報をアカウントではなくブラウザに保存するように MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/client/app/boot.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/client/app/boot.js') diff --git a/src/client/app/boot.js b/src/client/app/boot.js index 8a79880fb4..f5a1afec63 100644 --- a/src/client/app/boot.js +++ b/src/client/app/boot.js @@ -61,11 +61,8 @@ } // Dark/Light - const me = JSON.parse(localStorage.getItem('me') || null); - if (me && me.clientSettings) { - if ((app == 'desktop' && me.clientSettings.dark) || (app == 'mobile' && me.clientSettings.darkMobile)) { - document.documentElement.setAttribute('data-darkmode', 'true'); - } + if (localStorage.getItem('darkmode') == 'true') { + document.documentElement.setAttribute('data-darkmode', 'true'); } // Script version -- cgit v1.3.1-freya