@@ -2407,7 +2407,7 @@ class BookshelfRenderer3D {
24072407 if ( progressBadge ) progressBadge . textContent = `${ clamped } % ` ;
24082408 // Sync pages input
24092409 if ( pagesReadInput && pagesTotalInput ) {
2410- const pages = Math . round ( ( clamped / 100 ) * parseInt ( pagesTotalInput . value || totalPages ) ) ;
2410+ const pages = Math . round ( ( clamped / 100 ) * parseInt ( pagesTotalInput . value || totalPages , 10 ) ) ;
24112411 pagesReadInput . value = pages ;
24122412 }
24132413 if ( pagesBar ) pagesBar . style . width = `${ clamped } % ` ;
@@ -2450,12 +2450,12 @@ class BookshelfRenderer3D {
24502450 progressSlider . parentNode . replaceChild ( newSlider , progressSlider ) ;
24512451 newSlider . value = currentProgress ;
24522452 newSlider . addEventListener ( 'input' , ( ) => {
2453- const pct = parseInt ( newSlider . value ) ;
2453+ const pct = parseInt ( newSlider . value , 10 ) ;
24542454 if ( progressBar ) progressBar . style . width = `${ pct } % ` ;
24552455 if ( progressValue ) progressValue . textContent = `${ pct } % ` ;
24562456 if ( progressBadge ) progressBadge . textContent = `${ pct } % ` ;
24572457 // Sync pages
2458- const total = parseInt ( document . getElementById ( 'modal-pages-total' ) ?. value || totalPages ) ;
2458+ const total = parseInt ( document . getElementById ( 'modal-pages-total' , 10 ) ?. value || totalPages ) ;
24592459 const pages = Math . round ( ( pct / 100 ) * total ) ;
24602460 const pagesReadEl = document . getElementById ( 'modal-pages-read' ) ;
24612461 if ( pagesReadEl ) pagesReadEl . value = pages ;
@@ -2469,8 +2469,8 @@ class BookshelfRenderer3D {
24692469 const pagesTotalEl = document . getElementById ( 'modal-pages-total' ) ;
24702470 const sliderEl = document . getElementById ( 'modal-progress-slider' ) ;
24712471 if ( ! pagesReadEl || ! pagesTotalEl ) return ;
2472- const read = Math . max ( 0 , parseInt ( pagesReadEl . value ) || 0 ) ;
2473- const total = Math . max ( 1 , parseInt ( pagesTotalEl . value ) || 1 ) ;
2472+ const read = Math . max ( 0 , parseInt ( pagesReadEl . value , 10 ) || 0 ) ;
2473+ const total = Math . max ( 1 , parseInt ( pagesTotalEl . value , 10 ) || 1 ) ;
24742474 const pct = Math . min ( 100 , Math . round ( ( read / total ) * 100 ) ) ;
24752475 if ( sliderEl ) sliderEl . value = pct ;
24762476 if ( progressBar ) progressBar . style . width = `${ pct } % ` ;
@@ -2497,7 +2497,7 @@ class BookshelfRenderer3D {
24972497 progressSaveBtn . parentNode . replaceChild ( newSaveBtn , progressSaveBtn ) ;
24982498 newSaveBtn . addEventListener ( 'click' , async ( ) => {
24992499 const sliderEl = document . getElementById ( 'modal-progress-slider' ) ;
2500- const newProgress = sliderEl ? parseInt ( sliderEl . value ) : currentProgress ;
2500+ const newProgress = sliderEl ? parseInt ( sliderEl . value , 10 ) : currentProgress ;
25012501
25022502 newSaveBtn . disabled = true ;
25032503 newSaveBtn . innerHTML = '<i class="fa-solid fa-spinner fa-spin"></i> Saving...' ;
0 commit comments