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

[Feature Request] HTML-only version #237

Open
lxrst opened this issue Sep 22, 2021 · 5 comments
Open

[Feature Request] HTML-only version #237

lxrst opened this issue Sep 22, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@lxrst
Copy link

lxrst commented Sep 22, 2021

Can write the code myself but just wanted someone else's opinion first

Is your feature request related to a problem? Please describe.
Mango doesn't work on basic browsers (such as the Kindle Paperwhite's built-in browser) due to a lack of JS in these browsers.

Describe the solution you'd like
An HTML-only mode that strips out all JS

Describe a small use-case for this feature request
Would make Mango more accessible to Kindle Paperwhite users and other basic browsers

Additional context
I love Mango, but have been trying to reduce screen time as it's been impacting my sleep.


If this feature isn't wanted, I'll just try to get an e-ink display and attach it to a Pi and do it that way.

@lxrst lxrst added the enhancement New feature or request label Sep 22, 2021
@hkalexling
Copy link
Member

Hi there! Yes I think it would be a great feature to have. Some thoughts:

  • Without the ability to lazy load images, the continuous mode reader doesn't make sense, and we will need a custom paged reader
  • I think we should have a special entry for the HTML-only mode (e.g., /html/library maybe?), and add a noscript tag to all pages to instruct users to use the HTML-only mode when their browser doesn't support JS or has it disabled

Overall I think this would be a big feature that requires substantial effort, but please feel free to initiate it and let me know if you need any help.

@tr7zw
Copy link
Contributor

tr7zw commented Sep 23, 2021

Without the ability to lazy load images, the continuous mode reader doesn't make sense, and we will need a custom paged reader

About that, before I open a request in relation to that: Why is that required? Some mangas are released with reaaaallly long pages so the entire chapter has like 4 images. When reading on a slower connection you keep running into not yet loaded images(same with too high res images where loading on demand can't keep up). So I'd have requested to disable the lazy loading or make it prefetch further ahead.
I don't know how browsers handle it, but why wouldn't continuous mode make sense in that case (disabled lazy loading/pure html version)?

@hkalexling
Copy link
Member

@tr7zw Without lazy-loading the browser will have to fetch all images on that page, which increases the page load time (especially on low-power devices like e-ink readers). You can use the lazy loading attribute to achieve lazy-loading without JS, but the browser support isn't great, and I doubt that it's available in the Kindle browser.

@tr7zw
Copy link
Contributor

tr7zw commented Sep 23, 2021

@hkalexling But does that mean that the page is just white till all images are loaded, or will the page render and the images load as fast as they can? Because with the current implementation you can stay at the top of the page for 5 mins, scroll down a bit and nothing will be loaded since it only starts the loading once you get there. If an image takes 10 seconds to load, and I read the current image for more than 10 seconds, I'd expect not to run into unloaded images.

@hkalexling
Copy link
Member

@tr7zw I am not entirely sure, but I think without lazy-loading the browser would attempt to load all images simultaneously instead of prioritizing the images in view. So in the continuous mode, you won't be able to start reading until all images are loaded, which can take a while.

But yes, I agree we should preload a few pages when in the continuous reader, but for the HTML-only version, maybe it's better to limit it to paged mode.

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

No branches or pull requests

3 participants