From 4c808b131e22fd76d0cd758f203e344ba193c447 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=99=BE=E7=B1=B3?= Date: Fri, 27 Mar 2026 16:48:42 +0800 Subject: [PATCH] Fix initReader: Use parseFloat instead of parseInt to support decimal chapters --- alacarte-novel-website/js/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/alacarte-novel-website/js/app.js b/alacarte-novel-website/js/app.js index 1f05f3d..3a3368f 100644 --- a/alacarte-novel-website/js/app.js +++ b/alacarte-novel-website/js/app.js @@ -332,9 +332,9 @@ async function initReader() { await loadChaptersData(); } - // 获取章节参数 + // 获取章节参数(支持小数章节) const urlParams = new URLSearchParams(window.location.search); - const chapterId = parseInt(urlParams.get('id')) || 1; + const chapterId = parseFloat(urlParams.get('id')) || 1; // 加载章节内容 await loadChapter(chapterId);