mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-16 19:30:54 +08:00
🐛 2.修復評論utterances 在display_mode設置為dark時,仍顯示light主題的bug 🐛 3.修復display_mode設置dark沒有效果的bug 🎨 4.評論增加夜間模式、文章頁判斷,減少不必要的js加載
24 lines
771 B
Plaintext
24 lines
771 B
Plaintext
#disqus_thread
|
|
script.
|
|
var disqus_config = function () {
|
|
this.page.url = '!{ page.permalink }';
|
|
this.page.identifier = '!{ page.path }';
|
|
this.page.title = '!{ page.title }';
|
|
};
|
|
(function() {
|
|
var d = document, s = d.createElement('script');
|
|
s.src = 'https://!{theme.disqus.shortname}.disqus.com/embed.js';
|
|
s.setAttribute('data-timestamp', +new Date());
|
|
(d.head || d.body).appendChild(s);
|
|
})();
|
|
|
|
if is_post() && theme.disqus.count
|
|
script.
|
|
function getDisqusCount() {
|
|
var d = document, s = d.createElement('script');
|
|
s.src = 'https://!{theme.disqus.shortname}.disqus.com/count.js';
|
|
s.id = 'dsq-count-scr';
|
|
(d.head || d.body).appendChild(s);
|
|
}
|
|
|
|
window.addEventListener('load', getDisqusCount, false); |