mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-16 19:40:55 +08:00
✨ disqus/disqusjs/facebook comments 可隨夜間模式按鈕切換而轉換主題
🐛 修復pjax下valine評論顯示不正常的bugs 🐛 修復facebook comments 在手機下寬度不是100%的bugs
This commit is contained in:
@@ -6,11 +6,15 @@ script.
|
||||
this.page.title = '!{ page.title }'
|
||||
};
|
||||
|
||||
if (window.DISQUS) {
|
||||
window.disqusReset = () => {
|
||||
DISQUS.reset({
|
||||
reload: true,
|
||||
config: disqus_config
|
||||
})
|
||||
}
|
||||
|
||||
if (window.DISQUS) {
|
||||
disqusReset()
|
||||
} else {
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script')
|
||||
@@ -34,11 +38,11 @@ script.
|
||||
|
||||
if is_post() && theme.comments.count && defaultComment === 'Disqus'
|
||||
script.
|
||||
function getDisqusCount() {
|
||||
if (window.DISQUSWIDGETS === undefined) {
|
||||
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);
|
||||
} else {
|
||||
DISQUSWIDGETS.getCount({reset: true});
|
||||
}
|
||||
|
||||
getDisqusCount()
|
||||
Reference in New Issue
Block a user