修复流畅性

This commit is contained in:
zqlit committed 2026-05-25 00:03:50 +08:00
1 parent 3a7bddb881
commit 9ab38b6e6a
11 files changed
+175 -82

No files matched your search

+12 -4
View File
@@ -87,6 +87,10 @@ document.addEventListener("pjax:success", function () {
if (window.ViewImage) {
ViewImage.init('.post-content img');
}
if (typeof window.refreshFloatingTools === 'function') {
window.refreshFloatingTools();
}
});
// pjax加载完成
@@ -141,10 +145,14 @@ document.addEventListener("pjax:complete", function () {
}
// 重载 Search 和 Floating Tools (Moved from main.js)
if (typeof window.initFloatingTools === 'function') {
try {
window.initFloatingTools();
} catch(e) { console.error('initFloatingTools error:', e); }
if (typeof window.refreshFloatingTools === 'function') {
window.refreshFloatingTools();
} else if (typeof window.initFloatingTools === 'function') {
requestAnimationFrame(function() {
try {
window.initFloatingTools();
} catch(e) { console.error('initFloatingTools error:', e); }
});
}
if (typeof window.initSearch === 'function') {
try {