Skip to content

Commit

Permalink
71A231C4-AA09-49D4-B012-37E9A030F5C7
Browse files Browse the repository at this point in the history
  • Loading branch information
cophilot authored and DEP5560PBONIN$ committed Dec 19, 2023
1 parent 502c785 commit 0c6b67c
Show file tree
Hide file tree
Showing 3 changed files with 2,525 additions and 4 deletions.
9 changes: 7 additions & 2 deletions src/app/services/chaptermanager.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ export class ChaptermanagerService {
async init() {
if (this.initDone) return;

let json = await (await fetch('assets/chapters.json')).json();
let raw = await await (await fetch('assets/chapters')).text();
// raw is encoded in base64 decode it
console.log(raw);
raw = atob(raw);
raw = decodeURIComponent(escape(raw));
let json = JSON.parse(raw);
this.allChapters = this.getAllChapters(json);

for (let chapter of this.allChapters) {
Expand Down Expand Up @@ -56,7 +61,7 @@ export class ChaptermanagerService {
}

if (chapter.Password === '') {
VerifyCache.verifyChapter(chapter.Title, "");
VerifyCache.verifyChapter(chapter.Title, '');
}
}
this.allChapters = this.sortChaptersAlphabetically(this.allChapters);
Expand Down
Loading

0 comments on commit 0c6b67c

Please sign in to comment.