Comments (2)
Interesting. Looks like what they've done is :
- Take the original paragraphs
- Then add in lots of other paragraphs and spans. The original text remains, but it's buried in the "noise".
- Tag the noise in various ways, so browser hides it when viewing site normally. There are at least two mechanisms.
3.1 Have an attribute of aria-hidden='true'
3.2 Javascript list of classes to hide. Although it looks like the wanted paragraphs all contain a br element.
So, the following EpubEditor script will remove nearly all the noise.
for(let p of [...dom.querySelectorAll("span[aria-hidden='true']")]) {
p.remove();
}
for(let p of [...dom.querySelectorAll("p")]) {
if (p.querySelector("br") === null) {
p.remove();
}
}
return true;
Note:
- It doesn't fix the random author/translator note.
- Footnotes are still mixed in with the text. They have a class of "tooltiptext" so could be ripped out.
Actually migrating them to footnotes at bottom of page would require a more complex script
Tested with https://www.cntranslations.com/p/the-long-road-ahead.html, Chapters 1 and 2
For my notes: 58 minutes work
from webtoepub.
Thank you very much!! This fixed the issue really well! :D
from webtoepub.
Related Issues (20)
- Thank you. Please add https://daotranslate.us HOT 3
- Doesn’t grab covers on Webnovel.com HOT 11
- Download Lists for Bulk Downloading HOT 15
- https://kaystls.site/ fails to grab chapters HOT 3
- Please add site https://novelxo.net/authors/Moonlight%20Muse HOT 2
- Indenting first line in paragraphs HOT 1
- Password Protected Chapter Input HOT 3
- Site https://www.asianovel.net/ fails to grab chapters HOT 3
- Error 403 - FlowerManga HOT 3
- Remove author notes HOT 6
- Not Grabbing the Chapter Index Page HOT 4
- Website no longer able to download epub: https://syosetu.com/ HOT 3
- converter for webp HOT 1
- Not using the filename field to save the epub HOT 2
- 69Shu does not work HOT 1
- Content detection bug HOT 1
- Please add site https://readfreebooksonline.org HOT 4
- Kemono ignores embedded images HOT 4
- Thanks for this extension ❤️ HOT 1
- Mtlnation parser HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webtoepub.