🏗️ First time sync the css & js files from hexo theme NexT
This commit is contained in:
18
assets/js/third-party/comments/disqusjs.js
vendored
Normal file
18
assets/js/third-party/comments/disqusjs.js
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
/* global NexT, CONFIG, DisqusJS */
|
||||
|
||||
document.addEventListener('page:loaded', () => {
|
||||
if (!CONFIG.page.comments) return;
|
||||
|
||||
NexT.utils.loadComments('#disqus_thread')
|
||||
.then(() => NexT.utils.getScript(CONFIG.disqusjs.js, { condition: window.DisqusJS }))
|
||||
.then(() => {
|
||||
window.dsqjs = new DisqusJS({
|
||||
api : CONFIG.disqusjs.api || 'https://disqus.com/api/',
|
||||
apikey : CONFIG.disqusjs.apikey,
|
||||
shortname : CONFIG.disqusjs.shortname,
|
||||
url : CONFIG.page.permalink,
|
||||
identifier: CONFIG.page.path,
|
||||
title : CONFIG.page.title
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user