diff --git a/layout/_plugins/comments/artalk/script.ejs b/layout/_plugins/comments/artalk/script.ejs index 8a1d8a248..3406525a5 100644 --- a/layout/_plugins/comments/artalk/script.ejs +++ b/layout/_plugins/comments/artalk/script.ejs @@ -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, @@ -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") }) }