Greasy Fork is available in English.

Scroll with Mouse Plus

Scroll a page by simply moving the cursor up and down, without even a click!

Автор
hzhbest
Щоденних встановлень
0
Всього встановлень
1 061
Рейтинги
24 0 0
Версія
2.11
Створено
24.06.2020
Оновлено
22.08.2023
Ліцензія
GNU GPLv3
Відноситься до
Всі сайти

Intro

On the base of [Protector one]'s script [Scroll with the Mouse] GM script, I made a series of modifications to make the script able to:

  • Enter Free Scrolling mode and scroll the page without a click (original function);
  • Scroll as if dragging the scrollblock dragging (algorithm enhanced);
  • Work on all pages (compatibility improved, except for editable region);
  • Allow wider scroll-sensitive zone (flexibility);
  • Scroll in lower speed with Ctrl key pressed;
  • Display semi-transparent indicator bar (can turn on/off in the code);
  • Continue scrolling in Free Scrolling mode when the cursor move close to the page margin;
  • Click in the scroll-sensitive zone to exit Free Scrolling mode;
  • Scroll also horizontally.
  • Vertical scroll can be activated on the left.

INSTRUCTION

  1. Move the cursor into a scrollbar(#1, #2, #3, #6) to enter the Free Scrolling mode;
  2. In the Free Scrolling mode you can move the cursor within the scroll-sensitive zone and the page will scroll according to the cursor movement (just like dragging the scrollblock)(#4);
  3. An indicator bar(#5) is displayed under the mouse to tell that you are in the Free Scrolling mode while showing the range of the scroll-sensitive zone;
  4. To stop scrolling, just move the cursor out of the scroll-sensitive zone, or just do a left-click(#5). Then you will exit the Free Scrolling mode.

Notice

  • #1 The script only responds to main [body] of the page. It doesn't have scrolling effect to textarea, dropdown-list etc.
  • #2 The script itself defines the witdh of the "scrollbar" which you can modify in the source code.
  • #3 The script offers three options to enter the Free Scrolling mode. Please choose one option in the source code that fit your habit:

    (1) (Default) Move the cursor onto the scrollbar area;

    (2) Move the cursor onto the scrollbar area with Ctrl key pressed (when entered, Ctrl key can be released);

    (3) Move the cursor onto the scrollbar area within 100 pixel range in the middle.

  • #4 In the Free Scrolling mode, moving cursor with Ctrl key pressed will scroll the page in slow speed, for better reading/viewing.
  • #5 You can turn off the indicator bar in the source code. Notice that if you do so, you should try clicking on empty space to exit the Free Scrolling mode while avoiding mis-clicking sth. Thus moving your cursor out of the scroll-sensitive zone is recommended.
  • #6 You can choose to enable entering the Free Scrolling mode by moving mouse cursor to the Left, Right or Bottom sides, in the source code (with Right and Bottom sides enabled by default).

Other Things

The original script by Protector one:
https://userscripts-mirror.org/scripts/show/63593

If you prefer all-direction slow scrolling:
(CANNOT WORK with this script)
https://userscripts-mirror.org/scripts/show/47788

UPDATE LOG

20091229 v1.04 Add function: click to deactivate.
20091229 1.05 Not making the indicator bar when not activated.
20091230 v1.10 Add function: while the Free Scrolling mode active, keep moving the cursor near the top or bottom of the page will continue scroll the page up or down; all customizable variables are separated for easy code editing to customize.
20091230 v1.11 Abandon the method with which the original script used to determine page scroll height, instead I use the more accurate innerHeight, now the script can do it right in short pages; fix the code that would cause GreaseMonkey generates a long error log (through invisible to users).
20091230 v1.12 Abandon the method with which the original script used to determine page scroll width, instead I use the method similar to my method to improve compatibility; abandon text on the indicator bar, instead I use cursor.
20091230 v1.13 Disable on editable page (contentEditable="true").
20091231 v1.14 Add indicator bar height to customizable zone; algorithm changed to improve accuracy in long page.
20100105 v1.15 Algorithm change: if you provide the correct width of scrollbar, you will have accurate scrolling.
20100112 v1.16 Add optional condition to enter the free scroll mode; add function to press Ctrl for half scroll speed.
20200624 v1.17 Add compatibility setting to run on new version of GM; add exception to editable page.
20220209 v1.18 Fix the problem not working on new version of Firefox that uses floating scrollbar.
20230216 v2.0 Add function that respond to horizontal scrolling, with same operation as vertical; fix scrolling speed factor algorithm; modify scrolling speed with Ctrl key pressed to fixed speed.
20230822 v2.1 Add Left side activation function and configs.
20230822 v2.11 Fix bug when both Left and Right sides are enabled.