This commit is contained in:
syuilo
2020-02-17 06:37:39 +09:00
parent 26b3a14a63
commit 15839a7399
5 changed files with 5 additions and 2 deletions

View File

@ -40,7 +40,7 @@ html
if (theme) {
for (const [k, v] of Object.entries(JSON.parse(theme))) {
document.documentElement.style.setProperty(`--${k}`, v.toString());
if (k === 'accent') {
if (k === 'html') {
for (const tag of document.head.children) {
if (tag.tagName === 'META' && tag.getAttribute('name') === 'theme-color') {
tag.setAttribute('content', v);