fix(view): fix pjax support for busuanzi

pull/1335/head
Harry Huang 2024-12-24 22:07:51 +08:00
parent c8542f8136
commit 3ef067faa1
1 changed files with 9 additions and 1 deletions

View File

@ -34,7 +34,7 @@
// Listen for completion of Pjax // Listen for completion of Pjax
document.addEventListener('pjax:complete', () => { document.addEventListener('pjax:complete', () => {
// MathJax reload logic // Plugin [MathJax] reload logic
if (window.MathJax) { if (window.MathJax) {
try { try {
window.MathJax.typesetPromise && window.MathJax.typesetPromise(); window.MathJax.typesetPromise && window.MathJax.typesetPromise();
@ -42,6 +42,14 @@
console.error('MathJax reload error:', e); console.error('MathJax reload error:', e);
} }
} }
// Plugin [Busuanzi] reload logic
if (window.bszCaller && window.bszTag) {
window.bszCaller.fetch('//busuanzi.ibruce.info/busuanzi?jsonpCallback=BusuanziCallback', a => {
window.bszTag.texts(a);
window.bszTag.shows();
});
}
// TODO pace stop loading animation // TODO pace stop loading animation
}); });