Skip to content

Commit

Permalink
🐛 修复移动端切换暗色
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyanmaia authored and zkqiang committed Nov 20, 2022
1 parent ee92478 commit 270cd29
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source/js/color-schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@
}
});
}
if (document.documentElement.getAttribute('data-user-color-scheme')) {
var color = getComputedStyle(document.documentElement).getPropertyValue('--navbar-bg-color').trim()
document.querySelector('meta[name="theme-color"]').setAttribute('content', color)
}
}
}

Expand Down

0 comments on commit 270cd29

Please sign in to comment.