mirror of https://github.com/jkjoy/sunpeiwen.git
17 lines
459 B
Plaintext
17 lines
459 B
Plaintext
script.
|
|
(() => {
|
|
const getCount = () => {
|
|
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});
|
|
}
|
|
}
|
|
|
|
window.pjax ? getCount() : window.addEventListener('load', getCount)
|
|
|
|
})()
|