Skip to content

Commit

Permalink
fix(artalk): fancybox/darkmode
Browse files Browse the repository at this point in the history
  • Loading branch information
inkss committed May 22, 2022
1 parent 7d42316 commit c03684d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 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', '/')
}
volantis.artalk = new Artalk(Object.assign(<%- JSON.stringify(theme.comments.artalk) %>, {
new Artalk(Object.assign(<%- JSON.stringify(theme.comments.artalk) %>, {
el: '#artalk_container',
pageKey: path,
pageTitle: document.title,
Expand Down Expand Up @@ -46,8 +46,8 @@
<% } %>
}));
volantis.artalk.then(ctx => {
ctx.on('comments-loaded', () => {
Artalk.Use(ctx => {
ctx.on('list-loaded', () => {
if (typeof VolantisFancyBox === "undefined"){
const checkFancyBox = setInterval(() => {
if(typeof VolantisFancyBox === "undefined") return;
Expand All @@ -72,7 +72,7 @@
function dark_artalk() {
if(!document.querySelectorAll("#artalk_container")[0]) return;
volantis.artalk.then(ctx => {
Artalk.Use(ctx => {
ctx.setDarkMode(volantis.dark.mode === "dark")
})
}
Expand Down

0 comments on commit c03684d

Please sign in to comment.