/crx-fixed-position-scroll-buttons

website userscript: display a small fixed-position group of scroll buttons on all webpages

Primary LanguageJavaScriptGNU General Public License v2.0GPL-2.0

Userscript to run in both:

Its purpose is to:

  • provide a workaround in WebMonkey for a feature of Android System WebView version 58 and higher
    • description of feature
    • white paper for feature
    • issue that tracked the implementation of feature
    • summary of feature:
      • before this change,
        • a low-level mouse event in Android reached Blink as a touch event
      • after this change,
        • a mouse on an Android M (or later) device:
          1. will no longer fire TouchEvents
          2. will fire a consistent sequence of MouseEvents
    • comments from issue tracker:
      • #18:

        Today dragging the mouse in an Android native app (outside an editable text field) typically scrolls (like touch would). If we stop treating mice on Android like touch input, then we'll lose this property in Chrome (dragging the mouse will select text, never scroll). Is that the UX we want on Android for mouse input? Personally I think it should be, but there may be users used to scrolling this way.

      • #19:

        Yes, I think we should simply switch over the UX to be fully desktop-like and not worry about hypothetical existing users. Mouse selection is much more convenient than touch-based selection and it's one of the main reasons why a user might choose to plug in a mouse in the first place. On the other hand, mouse drag scrolling feels awkward and slow. And the mousewheel will always be available to scroll regardless.

  • display a small fixed-position group of scroll buttons on all webpages
    • a drag handle allows the group to be repositioned on the screen
    • configuration options at the beginning of the userscript allow the user to customize:
      • CSS style properties
        • ex: the font size of the text shown in the buttons
      • vertical scroll increment
        • as a percentage of the screen height
        • ex: 0.75 scrolls 75% of the screen
        • ex: 2.00 scrolls 200% of the screen
      • duration of delay (in milliseconds) to wait before writing to DOM
        • to allow other userscripts the opportunity to rewrite the DOM first

Legal: