From c0e363ecbcfad9b37383e7c8c195558c6fd890c8 Mon Sep 17 00:00:00 2001 From: dteviot Date: Mon, 16 Oct 2023 19:52:31 +1300 Subject: [PATCH] Add site https://moonlightnovel.com/ See: https://github.com/dteviot/WebToEpub/issues/1095 Was https://moonlightnovels.com/, but format completely changed --- plugin/js/parsers/MoonlightnovelsParser.js | 38 ---------------------- plugin/js/parsers/NoblemtlParser.js | 1 + plugin/popup.html | 1 - 3 files changed, 1 insertion(+), 39 deletions(-) delete mode 100644 plugin/js/parsers/MoonlightnovelsParser.js diff --git a/plugin/js/parsers/MoonlightnovelsParser.js b/plugin/js/parsers/MoonlightnovelsParser.js deleted file mode 100644 index 04d17f32..00000000 --- a/plugin/js/parsers/MoonlightnovelsParser.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; - -parserFactory.register("moonlightnovels.com", () => new MoonlightnovelsParser()); - -class MoonlightnovelsParser extends Parser{ - constructor() { - super(); - } - - async getChapterUrls(dom) { - let menu = [...dom.querySelectorAll("div.elementor-posts-container")].pop(); - return util.hyperlinksToChapterList(menu); - } - - findContent(dom) { - return dom.querySelector("div[data-widget_type='theme-post-content.default']"); - } - - extractTitleImpl(dom) { - return dom.querySelector("h2.elementor-heading-title"); - } - - extractDescription(dom) { - return dom.querySelector("meta[name='description']").textContent.trim(); - } - - findChapterTitle(dom) { - return dom.querySelector("h2"); - } - - findCoverImageUrl(dom) { - return util.getFirstImgSrc(dom, "#content div.elementor-widget-image"); - } - - getInformationEpubItemChildNodes(dom) { - return [...dom.querySelectorAll("div[data-widget_type='text-editor.default'] p")]; - } -} diff --git a/plugin/js/parsers/NoblemtlParser.js b/plugin/js/parsers/NoblemtlParser.js index 7e7199d6..99e3167a 100644 --- a/plugin/js/parsers/NoblemtlParser.js +++ b/plugin/js/parsers/NoblemtlParser.js @@ -4,6 +4,7 @@ parserFactory.register("bookalb.com", () => new NoblemtlParser()); parserFactory.register("ckandawrites.online", () => new NoblemtlParser()); parserFactory.register("daotranslate.com", () => new NoblemtlParser()); parserFactory.register("genesistls.com", () => new NoblemtlParser()); +parserFactory.register("moonlightnovel.com", () => new PandamtlParser()); parserFactory.register("noblemtl.com", () => new NoblemtlParser()); parserFactory.register("tamagotl.com", () => new NoblemtlParser()); parserFactory.register("knoxt.space", () => new NoblemtlParser()); diff --git a/plugin/popup.html b/plugin/popup.html index 5b0e2925..b8393951 100644 --- a/plugin/popup.html +++ b/plugin/popup.html @@ -638,7 +638,6 @@

Instructions

-