mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-12 22:17:06 +08:00
fix: artalk评论option无效
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
- const { server, site } = theme.artalk
|
- const { server, site, option } = theme.artalk
|
||||||
|
|
||||||
script.
|
script.
|
||||||
function addArtalkSource () {
|
function addArtalkSource () {
|
||||||
@@ -10,14 +10,14 @@ script.
|
|||||||
|
|
||||||
function loadArtalk () {
|
function loadArtalk () {
|
||||||
function initArtalk () {
|
function initArtalk () {
|
||||||
window.artalkItem = new Artalk({
|
window.artalkItem = new Artalk(Object.assign({
|
||||||
el: '#artalk-wrap',
|
el: '#artalk-wrap',
|
||||||
server: '!{server}',
|
server: '!{server}',
|
||||||
site: '!{site}',
|
site: '!{site}',
|
||||||
pageKey: location.pathname,
|
pageKey: location.pathname,
|
||||||
darkMode: document.documentElement.getAttribute('data-theme') === 'dark',
|
darkMode: document.documentElement.getAttribute('data-theme') === 'dark',
|
||||||
countEl: '.artalk-count'
|
countEl: '.artalk-count'
|
||||||
})
|
},!{JSON.stringify(option)}))
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof window.artalkItem === 'object') setTimeout(()=>{initArtalk()},200)
|
if (typeof window.artalkItem === 'object') setTimeout(()=>{initArtalk()},200)
|
||||||
|
|||||||
Reference in New Issue
Block a user