Skip to content

Commit

Permalink
Merge pull request #1483 from gamebeaker/update-scribblehub-metadata
Browse files Browse the repository at this point in the history
update scriblehub metadata
  • Loading branch information
gamebeaker authored Sep 11, 2024
2 parents 33509d0 + c63fc7a commit 81a10c0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions plugin/js/parsers/ScribblehubParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,19 @@ class ScribblehubParser extends Parser {
let author = dom.querySelector("span.auth_name_fic");
return (author === null) ? super.extractAuthor(dom) : author.textContent;
};

extractSubject(dom) {
let selector = "[property='genre']";
if (!document.getElementById("lesstagsCheckbox").checked) {
selector += ", .stag";
}
let tags = [...dom.querySelectorAll(selector)];
return tags.map(e => e.textContent.trim()).join(", ");
}

extractDescription(dom) {
return dom.querySelector("div [property='description']").textContent.trim();
}

findChapterTitle(dom) {
return dom.querySelector("div.chapter-title").textContent;
Expand Down

0 comments on commit 81a10c0

Please sign in to comment.