Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
jerryc127 committed May 19, 2022
2 parents fd21969 + b1e40b3 commit 004a27d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions layout/includes/third-party/comments/twikoo.pug
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ script.
}

const getCount = () => {
const countELement = document.getElementById('twikoo-count')
if(!countELement) return
twikoo.getCommentsCount({
envId: '!{envId}',
region: '!{region}',
urls: [window.location.pathname],
includeReply: false
}).then(function (res) {
document.getElementById('twikoo-count').innerText = res[0].count
countELement.innerText = res[0].count
}).catch(function (err) {
console.error(err);
});
Expand All @@ -48,4 +50,4 @@ script.
loadTwikoo()
}
}
})()
})()

0 comments on commit 004a27d

Please sign in to comment.