From 7ad2919a5ff6944365ec1f7e6183862fc473b73a Mon Sep 17 00:00:00 2001 From: dteviot Date: Wed, 15 Jan 2025 21:09:08 +1300 Subject: [PATCH] Add site https://dasuitl.com/ See: https://github.com/dteviot/WebToEpub/issues/1626 --- plugin/js/parsers/DasuitlParser.js | 22 ++++++++++++++++++++++ plugin/popup.html | 1 + 2 files changed, 23 insertions(+) create mode 100644 plugin/js/parsers/DasuitlParser.js diff --git a/plugin/js/parsers/DasuitlParser.js b/plugin/js/parsers/DasuitlParser.js new file mode 100644 index 00000000..f919290c --- /dev/null +++ b/plugin/js/parsers/DasuitlParser.js @@ -0,0 +1,22 @@ +"use strict"; + +parserFactory.register("dasuitl.com", () => new DasuitlParser()); + +class DasuitlParser extends WordpressBaseParser{ + constructor() { + super(); + } + + extractTitleImpl(dom) { + return dom.querySelector(".card_title"); + } + + removeUnwantedElementsFromContentElement(element) { + util.removeChildElementsMatchingCss(element, ".wp-block-buttons"); + super.removeUnwantedElementsFromContentElement(element); + } + + findChapterTitle(dom) { + return dom.querySelector(".card_title"); + } +} diff --git a/plugin/popup.html b/plugin/popup.html index 8cac4409..719ad051 100644 --- a/plugin/popup.html +++ b/plugin/popup.html @@ -576,6 +576,7 @@

Instructions

+