Skip to content

Commit

Permalink
fix(artalk): 深色模式主动切换修复
Browse files Browse the repository at this point in the history
  • Loading branch information
inkss committed Jun 10, 2022
1 parent 482601a commit e4a7e2d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions layout/_plugins/comments/artalk/script.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
path = path.replaceAll('/index.html', '/').replaceAll('.html', '')
}
new Artalk(Object.assign(<%- JSON.stringify(theme.comments.artalk) %>, {
volantis.artalk = new Artalk(Object.assign(<%- JSON.stringify(theme.comments.artalk) %>, {
el: '#artalk_container',
pageKey: path,
pageTitle: document.title,
Expand Down Expand Up @@ -72,7 +72,7 @@
function dark_artalk() {
if(!document.querySelectorAll("#artalk_container")[0]) return;
Artalk.Use(ctx => {
volantis.artalk.then(ctx => {
ctx.setDarkMode(volantis.dark.mode === "dark")
})
}
Expand Down

0 comments on commit e4a7e2d

Please sign in to comment.