fixes for extension sources & tweaks
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user