diff --git a/layout/_partial/comments/artalk/script.ejs b/layout/_partial/comments/artalk/script.ejs index 74e70fc..f5fb5f8 100644 --- a/layout/_partial/comments/artalk/script.ejs +++ b/layout/_partial/comments/artalk/script.ejs @@ -6,10 +6,7 @@ if (!el) return; utils.css('<%- theme.comments.artalk.css %>'); utils.js('<%- theme.comments.artalk.js %>', {defer: true}).then(function () { - const path = el.getAttribute('comment_id'); - if (!path) { - path = decodeURI(window.location.pathname); - } + const path = el.getAttribute('comment_id') ?? decodeURI(window.location.pathname); const artalk = Artalk.init({ el: '#artalk_container', pageKey: path, diff --git a/layout/_partial/comments/twikoo/script.ejs b/layout/_partial/comments/twikoo/script.ejs index ed52fb0..e1a2846 100644 --- a/layout/_partial/comments/twikoo/script.ejs +++ b/layout/_partial/comments/twikoo/script.ejs @@ -1,14 +1,11 @@ + <%- partial('scripts/theme') %>