From 2f8ecaa0d2791f43e3a73529f391f6ce90efc69d Mon Sep 17 00:00:00 2001 From: gamebeaker Date: Fri, 20 Sep 2024 14:35:33 +0200 Subject: [PATCH 1/2] fix GenesiStudioParser --- plugin/js/parsers/GenesiStudioParser.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugin/js/parsers/GenesiStudioParser.js b/plugin/js/parsers/GenesiStudioParser.js index 0c52a128..16a35bec 100644 --- a/plugin/js/parsers/GenesiStudioParser.js +++ b/plugin/js/parsers/GenesiStudioParser.js @@ -18,7 +18,7 @@ class GenesiStudioParser extends Parser{ async getChapterUrls(dom) { let data = (await HttpClient.fetchJson(dom.baseURI + "/__data.json")).json; let tmpids = data.nodes[2].data[0].chapters; - tmpids = data.nodes[2].data[tmpids].free; + tmpids = data.nodes[2].data[tmpids].free_chapters; let freeChapterids = data.nodes[2].data[tmpids]; let returnchapters = freeChapterids.map(e => ({ @@ -34,7 +34,9 @@ class GenesiStudioParser extends Parser{ let newDoc = Parser.makeEmptyDocForContent(url); this.appendElement(newDoc, "h1", this.titleFromJson(json)); - this.appendContent(newDoc, json.nodes[2].data[json.nodes[2].data[0].content]); + let hash = json.nodes[2].data[json.nodes[2].data[0].akezmZmaAOMmegnQAlkRnalAJnr]; + let content = json.nodes[2].data[json.nodes[2].data[0][hash]]; + this.appendContent(newDoc, content); let notes = json.nodes[2].data[json.nodes[2].data[0].footnotes]; if (notes !== null && notes != "") { this.appendElement(newDoc, "h3", "Notes"); From ddc40bb0ee267dfb0dfdd3c7bf7f2ee67b92a3ea Mon Sep 17 00:00:00 2001 From: gamebeaker Date: Fri, 20 Sep 2024 14:38:29 +0200 Subject: [PATCH 2/2] fix GenesiStudioParser notes --- plugin/js/parsers/GenesiStudioParser.js | 1 - 1 file changed, 1 deletion(-) diff --git a/plugin/js/parsers/GenesiStudioParser.js b/plugin/js/parsers/GenesiStudioParser.js index 16a35bec..6c52e3a0 100644 --- a/plugin/js/parsers/GenesiStudioParser.js +++ b/plugin/js/parsers/GenesiStudioParser.js @@ -39,7 +39,6 @@ class GenesiStudioParser extends Parser{ this.appendContent(newDoc, content); let notes = json.nodes[2].data[json.nodes[2].data[0].footnotes]; if (notes !== null && notes != "") { - this.appendElement(newDoc, "h3", "Notes"); this.appendContent(newDoc, notes); } return newDoc.dom;