Mango icon indicating copy to clipboard operation
Mango copied to clipboard

[Feature Request] HTML-only version

Open lxrst opened this issue 4 years ago • 5 comments

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 avatar Sep 22 '21 17:09 lxrst

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.

hkalexling avatar Sep 23 '21 01:09 hkalexling

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)?

tr7zw avatar Sep 23 '21 07:09 tr7zw

@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.

hkalexling avatar Sep 23 '21 08:09 hkalexling

@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.

tr7zw avatar Sep 23 '21 08:09 tr7zw

@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.

hkalexling avatar Sep 23 '21 11:09 hkalexling