ダークモード情報をアカウントではなくブラウザに保存するように
This commit is contained in:
parent
d2d3a7d52b
commit
08b8d829f9
4 changed files with 34 additions and 31 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue