Merge pull request #1335 from isHarryh/master

fix(view): fix pjax support for busuanzi
pull/1338/head
Ruipeng Zhang 2024-12-25 22:01:30 -08:00 committed by GitHub
commit b00d5ae9d9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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
}); });