🎨 🐛 Rename file & path & remove unused file.
This commit is contained in:
28
assets/js/3rd/comments/utterances.js
Normal file
28
assets/js/3rd/comments/utterances.js
Normal file
@@ -0,0 +1,28 @@
|
||||
/* Utterances comment plugin */
|
||||
NexT.plugins.comments.utterances = function() {
|
||||
const element = '.utterances-container';
|
||||
if (!NexT.CONFIG.utterances
|
||||
|| !NexT.utils.checkDOMExist(element)) return;
|
||||
|
||||
const {
|
||||
repo,
|
||||
issueterm,
|
||||
label,
|
||||
theme } = NexT.CONFIG.utterances.cfg;
|
||||
|
||||
NexT.utils.lazyLoadComponent(element, function() {
|
||||
NexT.utils.getScript(NexT.CONFIG.utterances.js, {
|
||||
attributes: {
|
||||
'async' : true,
|
||||
'crossorigin' : 'anonymous',
|
||||
'repo' : repo,
|
||||
'issue-term' : issueterm,
|
||||
'label' : label,
|
||||
'theme' : theme
|
||||
},
|
||||
parentNode: document.querySelector(element)
|
||||
});
|
||||
|
||||
NexT.utils.hiddeLodingCmp(element);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user