fixes for extension sources & tweaks

This commit is contained in:
2025-11-29 22:11:42 +01:00
parent 655ab9c987
commit 7625c52017
17 changed files with 1103 additions and 463 deletions

View File

@@ -104,7 +104,6 @@ async function loadChapters() {
? `/api/book/${bookId.slice(0, 40)}/chapters`
: `/api/book/${bookId}/chapters`;
console.log(fetchUrl)
const res = await fetch(fetchUrl);
const data = await res.json();

View File

@@ -49,11 +49,11 @@ async function fetchBookSearch(query) {
function createSlug(text) {
if (!text) return '';
return text
.toString()
.toLowerCase()
.trim()
.replace(/[^a-z0-9\s-]/g, '')
.replace(/[\s-]+/g, '-');
.replace(/-/g, '--')
.replace(/\s+/g, '-')
.replace(/[^a-z0-9\-]/g, '');
}
function renderSearchResults(results) {