Skip to content

Commit

Permalink
Merge pull request #1052 from xRahul/ExperimentalTabMode
Browse files Browse the repository at this point in the history
Add author extract for mtl novel
  • Loading branch information
dteviot authored Aug 25, 2023
2 parents b3cb903 + b4a6bc7 commit b675cf9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@
{ "name": "alethiophile"},
{ "name": "Dimava"},
{ "name": "Leone Jacob Sunil (ImLJS)"},
{ "name": "Yoanhg421"}
{ "name": "Yoanhg421"},
{ "name": "xRahul"}
],
"license": "GPL-3.0-only",
"bugs": {
Expand Down
5 changes: 5 additions & 0 deletions plugin/js/parsers/MtlnovelParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ class MtlnovelParser extends Parser{
return dom.querySelector(".entry-title");
};

extractAuthor(dom) {
let authorLabel = dom.querySelector("#author");
return (authorLabel === null) ? super.extractAuthor(dom) : authorLabel.textContent;
}

removeUnwantedElementsFromContentElement(element) {
let original = "";
if (this.userPreferences.removeOriginal.value) {
Expand Down
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Credits
* alethiophile
* Yoanhg421
* Leone Jacob Sunil (ImLJS)
* xRahul

## How to use with Baka-Tsuki:
* Browse to a Baka-Tsuki web page that has the full text of a story.
Expand Down

0 comments on commit b675cf9

Please sign in to comment.