diff --git a/frontend/js/ambient.js b/frontend/js/ambient.js index 586235ea..631f382c 100644 --- a/frontend/js/ambient.js +++ b/frontend/js/ambient.js @@ -489,7 +489,7 @@ document.addEventListener('DOMContentLoaded', () => { const type = Math.random(); if (type < 0.5) { - el.innerHTML = ` + el.textContent = ` `; } else if (type < 0.75) { diff --git a/frontend/js/app.js b/frontend/js/app.js index 36a0fdef..55d32b43 100644 --- a/frontend/js/app.js +++ b/frontend/js/app.js @@ -152,7 +152,7 @@ const CollectionAPI = { method: 'POST', headers: this.getHeaders(), credentials: 'include', - body: JSON.stringify({ user_id: parseInt(userId), name, description, is_public: isPublic }) + body: JSON.stringify({ user_id: parseInt(userId, 10), name, description, is_public: isPublic }) }); if (!res.ok) { const errData = await res.json().catch(() => ({})); diff --git a/frontend/js/library-3d.js b/frontend/js/library-3d.js index ba5cc1c6..c6461afc 100644 --- a/frontend/js/library-3d.js +++ b/frontend/js/library-3d.js @@ -2407,7 +2407,7 @@ class BookshelfRenderer3D { if (progressBadge) progressBadge.textContent = `${clamped}% `; // Sync pages input if (pagesReadInput && pagesTotalInput) { - const pages = Math.round((clamped / 100) * parseInt(pagesTotalInput.value || totalPages)); + const pages = Math.round((clamped / 100) * parseInt(pagesTotalInput.value || totalPages, 10)); pagesReadInput.value = pages; } if (pagesBar) pagesBar.style.width = `${clamped}% `;