plateaukao / einkbro

A small, fast web browser based on Android WebView. It's tailored for E-Ink devices but also works great on normal android devices.
Other
1.05k stars 77 forks source link

PageDown/PageUp function not working on certain website #366

Closed xqdd closed 1 month ago

xqdd commented 2 months ago

example1:https://wangwei1237.github.io/monolith-to-microservices/docs/What_Are_Microservices.html example2:https://www.xiaolincoding.com/network/1_base/tcp_ip_model.html

Neither the touch area nor the volume button work, but when I connect a physical keyboard and press PageDown/PageUp/Space key, it working

xqdd commented 2 months ago

The weird thing is that it works fine on my phone, but not working on my E-ink device(IReader SmartXs Pro with a 8 inch screen)

plateaukao commented 2 months ago

For first link, it does not work in my iReader Ocean2, but works on my phone. For second link, it works on my iReader Ocean2 and my phone.

For first link, It looks like it shows different layout for tablet and phone size, and that's causing issues which makes EinkBro can't get the correct page height, nor change its page position. I have no way to fix this.

xqdd commented 2 months ago

I tried to fix it by find the overflow-y:auto element and scroll on it, work very well for first link. It's a bit of a tricky and not fully tested for other websites.

https://greasyfork.org/zh-CN/scripts/494503-high-contrast-theme-for-e-ink-displays-and-page-down image

How about offer an option, force mapping the volume plus/minus key to Physical PageDown/PageUp/Space key?

xqdd commented 2 months ago

It looks like it shows different layout for tablet and phone size

Or can EinkBro offer a option to limit max screen width? Then the website wiil regard device as phone rather than tablet.

plateaukao commented 2 months ago

thanks for providing the script. I'll see what I can improve in EinkBro. Also, providing option to map volume key to pageup pagedown is good suggestion, I'll add it to settings.

As for limiting device max width, I'll check whether it's good to provide or not.

malnoxon commented 1 month ago

The touch area on my boox tab ultra has the same issue with paging on https://feedly.com/i/my as well as the first link. Second link pages as expected.

plateaukao commented 1 month ago

@xqdd I added the feature in 23c3fc57 You should be able to find "try fix scrolling" when open touchArea Dialog. It will apply the javascript to current website next time you open it. (So, after turned it on, you can reload the page to see if original touch area works.)

image
plateaukao commented 1 month ago

@malnoxon it looks like feedly is using other techniques to scroll pages. So the fix does not work.