danman113 / simple-autoscrollv2

Manifest V3 version of autoscroll
GNU General Public License v3.0
8 stars 4 forks source link

[Bug] Many sites no longer scroll #5

Closed danman113 closed 1 year ago

danman113 commented 1 year ago

Many popular sites, such as https://news.ycombinator.com/, no longer scroll. This is likely a problem with the content script matcher:

"matches": [
        "*://*/*"
      ]

Further investigation is needed.

danman113 commented 1 year ago

I made a minor change to the matches field, but the problem didn't stem from there. Rather, the issue was distinguishing between two types of websites: those that can be scrolled with document.body.scroll and those that require document.body.parentNode.scroll. It's difficult to differentiate between the two types without testing them with .scroll. So, my new approach is to first try scrolling with document.body, and if it doesn't work, then attempt scrolling with document.body.parentNode.