hexo-blog-deploy/js/third-party/comments/utterances.js

18 lines
552 B
JavaScript
Raw Normal View History

2023-04-26 06:12:09 +00:00
/* global NexT, CONFIG */
document.addEventListener('page:loaded', () => {
if (!CONFIG.page.comments) return;
NexT.utils.loadComments('.utterances-container')
.then(() => NexT.utils.getScript('https://utteranc.es/client.js', {
attributes: {
async : true,
crossOrigin : 'anonymous',
'repo' : CONFIG.utterances.repo,
'issue-term': CONFIG.utterances.issue_term,
'theme' : CONFIG.utterances.theme
},
parentNode: document.querySelector('.utterances-container')
}));
});