-
Notifications
You must be signed in to change notification settings - Fork 88
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
base: master
Are you sure you want to change the base?
Conversation
It's in every chapter, at the end.
src/plugins/english/novelfull.ts
Outdated
@@ -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\./, |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
It's in every chapter, at the end.
Closes #1182