Skip to content

Commit

Permalink
Add author notes for travistranslations.com
Browse files Browse the repository at this point in the history
See: #1259
  • Loading branch information
dteviot committed Mar 19, 2024
1 parent 729cc3d commit 82b27cf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 0 additions & 1 deletion plugin/js/parsers/ShanghaifantasyParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ class ShanghaifantasyParser extends Parser{
for(let e of [...element.querySelectorAll("div")]) {
e.removeAttribute(":style");
e.removeAttribute(":class");
e.removeAttribute(":class");
e.removeAttribute("@click.outside");
}

Expand Down
8 changes: 8 additions & 0 deletions plugin/js/parsers/TravistranslationsParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ class TravistranslationsParser extends Parser{

preprocessRawDom(webPageDom) {
util.resolveLazyLoadedImages(webPageDom, "img");
this.addAuthorNotes(webPageDom);
}

addAuthorNotes(webPageDom) {
let content = this.findContent(webPageDom);
for(let n of [...content.parentElement.querySelectorAll("div.py-1")]) {
content.append(n);
}
}

getInformationEpubItemChildNodes(dom) {
Expand Down

0 comments on commit 82b27cf

Please sign in to comment.