mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-18 18:33:42 +00:00
Upgrade to disqusjs@3 (#529)
This commit is contained in:
parent
aacc483fc2
commit
8876fe6238
12
_vendors.yml
12
_vendors.yml
@ -93,14 +93,14 @@ quicklink:
|
||||
integrity: sha256-4kQf9z5ntdQrzsBC3YSHnEz02Z9C1UeW/E9OgnvlzSY=
|
||||
disqusjs_js:
|
||||
name: disqusjs
|
||||
version: 1.3.0
|
||||
file: dist/disqus.js
|
||||
integrity: sha256-LVaMHPQ2zLqOc5rXSAfr4d1PIkEGNLyyUTDNPZmTtUw=
|
||||
version: 3.0.2
|
||||
file: dist/browser/disqusjs.es2015.umd.min.js
|
||||
integrity: sha256-okP99ZQKVpIy7+NogAMpGlIQzJa9XKXhIJcFgdju5bU=
|
||||
disqusjs_css:
|
||||
name: disqusjs
|
||||
version: 1.3.0
|
||||
file: dist/disqusjs.css
|
||||
integrity: sha256-GxdCIOyfxQ1OBfS99qAIJDoGK1ADuBsxhMTqXG82fAY=
|
||||
version: 3.0.2
|
||||
file: dist/browser/styles/disqusjs.css
|
||||
integrity: sha256-71XarXwNr1Td27HmZI9zjY+rMzRdush6/glo6VFXp7o=
|
||||
gitalk_js:
|
||||
name: gitalk
|
||||
version: 1.7.2
|
||||
|
||||
@ -10,7 +10,7 @@ hexo.extend.filter.register('theme_inject', injects => {
|
||||
if (!config.enable || !config.shortname || !config.apikey) return;
|
||||
|
||||
injects.comment.raw('disqusjs', `
|
||||
<div class="comments" id="disqus_thread">
|
||||
<div class="comments disqusjs">
|
||||
<noscript>Please enable JavaScript to view the comments powered by Disqus.</noscript>
|
||||
</div>
|
||||
`, {}, { cache: true });
|
||||
|
||||
5
source/js/third-party/comments/disqusjs.js
vendored
5
source/js/third-party/comments/disqusjs.js
vendored
@ -14,5 +14,10 @@ document.addEventListener('page:loaded', () => {
|
||||
identifier: CONFIG.page.path,
|
||||
title : CONFIG.page.title
|
||||
});
|
||||
window.dsqjs.render(document.querySelector('.disqusjs'));
|
||||
});
|
||||
});
|
||||
|
||||
document.addEventListener('pjax:send', () => {
|
||||
if (window.dsqjs) window.dsqjs.destroy();
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user