ダークモード情報をアカウントではなくブラウザに保存するように

This commit is contained in:
syuilo
2018-04-22 17:28:21 +09:00
parent d2d3a7d52b
commit 08b8d829f9
4 changed files with 34 additions and 31 deletions

View File

@@ -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