Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NovelFull: regex to remove end-chapter spam #1188

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Palloxin
Copy link
Contributor

It's in every chapter, at the end.
Closes #1182

@@ -119,7 +119,10 @@ class NovelFull implements Plugin.PluginBase {
loadedCheerio('#chapter-content div.ads').remove();
const chapterText = loadedCheerio('#chapter-content').html() || '';

return chapterText;
return chapterText.replace(
/If you find any errors \(Ads popup, ads redirect, broken links, non-standard content, etc\.\.\), Please let us know \S* report chapter \S* so we can fix it as soon as possible\./,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this text not part of any element that could be removed instead of matching and replacing it entirely?

Copy link
Contributor Author

@Palloxin Palloxin Sep 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea.
On pc browser it doesnt appear while on mobile webview it appears always.

In any case, it's either I wait for someone to pick the 1 in a 240 issues and fix it or I do it myself with a silly solution.

The spam is always present, be it old or recent chaps, so it will always match.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could check the HTML of the mobile version of the site and remove the element if it exists. That would be a better solution.

Copy link
Contributor Author

@Palloxin Palloxin Sep 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not possible. I lack the skills even I knew.

@Palloxin
Copy link
Contributor Author

Palloxin commented Dec 1, 2024

YjWHxrK9
the spam is baked in the chapter content

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NovelFull: remove report description at end of chapters
2 participants