LOADING
+ + ++ LOADING +
{{novel.info.name}}
-{{ novel.info.name }}
" + chapterTitle + "
"; chapterBody += chapterHtml.outerHTML; - chapterBody = chapterBody.replace(//g, "
"); - console.log(chapterBody); + chapterBody = chapterBody.replace(/< *br *>/gi, "
"); // Make sure all
tags end correctly for xhtml + chapterBody = chapterBody.replace(/
/gi, ""); // Remove any useless tags + chapterBody = chapterBody.replace(/(])*)>/gi, "$1/>"); // Make sure img tag ends correctly for xhtml + + // Add propoganda chapterBody += "
" chapterBody += "
dr-nyt's NovelScraper scraped this novel from a pirate site.
" chapterBody += "If you can, please support the author(s) of this novel: " + novel.info.author + "
" @@ -110,6 +113,7 @@ export class BoxnovelService { } catch (error) { console.log(error); + return false; } } diff --git a/src/app/novel/novel.component.ts b/src/app/novel/novel.component.ts index 51d46c7f..4138018c 100644 --- a/src/app/novel/novel.component.ts +++ b/src/app/novel/novel.component.ts @@ -128,6 +128,8 @@ export class NovelComponent implements OnInit { this.downloaded = true; this.novelplanetService.updateDownloaded(this.novel.info.link, true); }); + } else { + this.downloading = false; } }); } else if (this.novel.info.source == 'boxnovel') { @@ -141,6 +143,8 @@ export class NovelComponent implements OnInit { this.downloaded = true; this.boxnovelService.updateDownloaded(this.novel.info.link, true); }); + } else { + this.downloading = false; } }); } else if (this.novel.info.source == 'readlightnovel') { @@ -154,6 +158,8 @@ export class NovelComponent implements OnInit { this.downloaded = true; this.readlightnovelService.updateDownloaded(this.novel.info.link, true); }); + } else { + this.downloading = false; } }); } diff --git a/src/app/readlightnovel.service.ts b/src/app/readlightnovel.service.ts index 57dbc073..ef64d273 100644 --- a/src/app/readlightnovel.service.ts +++ b/src/app/readlightnovel.service.ts @@ -81,6 +81,7 @@ export class ReadlightnovelService { try { // let stringHtml = await this.getHtmlString("https://www.readlightnovel.org/overlord-ln/volume-8/chapter-"); let stringHtml = await this.getHtmlString(chapterLinks[i]); + stringHtml = stringHtml.replace(//i, ""); let pageHtml = new DOMParser().parseFromString(stringHtml, 'text/html'); let chapterHtml = pageHtml.getElementsByClassName('desc')[0].getElementsByClassName("hidden")[0]; @@ -88,8 +89,11 @@ export class ReadlightnovelService { let chapterBody = "" + chapterTitle + "
"; chapterBody += chapterHtml.outerHTML; - chapterBody = chapterBody.replace(//g, "
"); - console.log(chapterBody); + chapterBody = chapterBody.replace(/< *br *>/gi, "
"); // Make sure all
tags end correctly for xhtml + chapterBody = chapterBody.replace(/
/gi, ""); // Remove any useless tags + chapterBody = chapterBody.replace(/(])*)>/gi, "$1/>"); // Make sure img tag ends correctly for xhtml + + // Add propoganda chapterBody += "
" chapterBody += "
dr-nyt's NovelScraper scraped this novel from a pirate site.
" chapterBody += "If you can, please support the author(s) of this novel: " + novel.info.author + "
" @@ -113,6 +117,7 @@ export class ReadlightnovelService { } catch (error) { console.log(error); + return false; } }