Fix getCurrentChapterId: Use parseFloat instead of parseInt to support decimal chapters
This commit is contained in:
parent
847d39ec54
commit
f8dcd3c280
@ -493,7 +493,8 @@ function initSidebar() {
|
|||||||
|
|
||||||
function getCurrentChapterId() {
|
function getCurrentChapterId() {
|
||||||
const urlParams = new URLSearchParams(window.location.search);
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
return parseInt(urlParams.get('id')) || 1;
|
const id = urlParams.get('id');
|
||||||
|
return id ? parseFloat(id) : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
function recordReadingProgress(chapterId) {
|
function recordReadingProgress(chapterId) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user