文章详细页实现全局DOM加载

This commit is contained in:
2026-08-30 19:25:53 +08:00
parent 65fbf97099
commit b161d6e5c8
5 changed files with 267 additions and 97 deletions
+8 -3
View File
@@ -228,9 +228,14 @@
var targetPage = parseInt(jumpInput.value, 10) || 1;
var max = parseInt(jumpInput.dataset.maxPages || String(maxPages), 10) || maxPages;
targetPage = Math.max(1, Math.min(max, targetPage));
var url = new URL(window.location.href);
url.searchParams.set("cpage", String(targetPage));
window.location.href = url.toString();
// 评论跳页:本地 DOM 刷新,地址栏不携带 ? 参数。
if (window.AksrtComments && typeof window.AksrtComments.loadPage === "function") {
e.preventDefault();
window.AksrtComments.loadPage(targetPage);
return;
}
window.location.hash = "comments";
window.location.reload();
return;
}
if (loadMoreBtn.dataset.jumpArchive === "1") {