Skip to content

Commit 3ef067f

Browse files
committed
fix(view): fix pjax support for busuanzi
1 parent c8542f8 commit 3ef067f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

source/js/pjax.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,22 @@
3434

3535
// Listen for completion of Pjax
3636
document.addEventListener('pjax:complete', () => {
37-
// MathJax reload logic
37+
// Plugin [MathJax] reload logic
3838
if (window.MathJax) {
3939
try {
4040
window.MathJax.typesetPromise && window.MathJax.typesetPromise();
4141
} catch (e) {
4242
console.error('MathJax reload error:', e);
4343
}
4444
}
45+
// Plugin [Busuanzi] reload logic
46+
if (window.bszCaller && window.bszTag) {
47+
window.bszCaller.fetch('//busuanzi.ibruce.info/busuanzi?jsonpCallback=BusuanziCallback', a => {
48+
window.bszTag.texts(a);
49+
window.bszTag.shows();
50+
});
51+
}
52+
4553
// TODO pace stop loading animation
4654
});
4755

0 commit comments

Comments
 (0)