Speed up top nav with turbo routing and external base CSS.
Remove view-transition lag, swap main content without full reload, prefetch pages, and tear down SSE timers on leave. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+7
-3
@@ -147,13 +147,17 @@
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
function bootStatsPage() {
|
||||
var viewSel = document.getElementById('stats-view-select');
|
||||
if (viewSel) {
|
||||
if (viewSel && !viewSel.dataset.statsBound) {
|
||||
viewSel.dataset.statsBound = '1';
|
||||
viewSel.addEventListener('change', function () {
|
||||
renderBreakdown(this.value);
|
||||
});
|
||||
}
|
||||
loadStats();
|
||||
});
|
||||
}
|
||||
|
||||
if (window.qihuoOnPageLoad) window.qihuoOnPageLoad(bootStatsPage);
|
||||
else document.addEventListener('DOMContentLoaded', bootStatsPage);
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user