Skip to content

Commit 0a9fc7e

Browse files
author
Saurabh Kumar Bajpai
committed
fix: resolve 4 bugs in BiblioDrift
1 parent af173a5 commit 0a9fc7e

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎frontend/js/ambient.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ document.addEventListener('DOMContentLoaded', () => {
489489

490490
const type = Math.random();
491491
if (type < 0.5) {
492-
el.innerHTML = `<svg width="${size}" height="${size}" viewBox="0 0 20 20">
492+
el.textContent = `<svg width="${size}" height="${size}" viewBox="0 0 20 20">
493493
<path d="M10 1 L11.5 8.5 L19 10 L11.5 11.5 L10 19 L8.5 11.5 L1 10 L8.5 8.5 Z"
494494
fill="${color}" opacity="0.9"/></svg>`;
495495
} else if (type < 0.75) {

‎frontend/js/app.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ const CollectionAPI = {
152152
method: 'POST',
153153
headers: this.getHeaders(),
154154
credentials: 'include',
155-
body: JSON.stringify({ user_id: parseInt(userId), name, description, is_public: isPublic })
155+
body: JSON.stringify({ user_id: parseInt(userId, 10), name, description, is_public: isPublic })
156156
});
157157
if (!res.ok) {
158158
const errData = await res.json().catch(() => ({}));

‎frontend/js/library-3d.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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}% `;

0 commit comments

Comments
 (0)