您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Scroll a page by simply moving the cursor up and down, without even a click!
当前为
From "Protector one"'s script "Scroll with the Mouse", I take the idea and do some modifications so that this script can do:
启发自“Protector one”的脚本“Scroll with the Mouse”,我取用了其实现方式(代码)并添加了我自己的想法所作的修改,形成了这个脚本,它能够:
The original script by Protector one:|原始脚本位置:
https://userscripts-mirror.org/scripts/show/63593
If you prefer all-direction slow scrolling:|我推荐的全方向(慢)滚动脚本:
(NOT Compatible with this script)|(同我的脚本无法共用)
https://userscripts-mirror.org/scripts/show/47788
20091229|1.04 Add function: click to deactivate.|增加功能:点击退出“自由滚动模式”。
20091229|1.05 Not making the indicator bar when not activated.|不再提早生成提示条,避免在 HTML 编辑器中留下不必要的痕迹。
20091230 1.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|1.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).| 放弃原脚本的方法,用 innerHeight 判断页面显示高度,使得在短页面脚本不会被激活;修复一个小错误。
20091230|1.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|1.13 Disable on editable page (contentEditable="true").| 不对可编辑的页面起作用,例如“所见即所得”的网页编辑器。
20091231|1.14 Add indicator bar height to customizable zone; algorithm changed to improve accuracy in long page.| 增加调整提示条粗细的自定义项;更新算法使长页面的滚动准确跟上鼠标移动。
20100105|1.15 Algorithm change: if you provide the correct width of scrollbar, you will have accurate scrolling.| 算法更新:在代码中指定位置填入正确的滚动条宽度的话,将可以做到与拖动滚动块完全无异。
20100112|1.16 Add optional condition to activate free scroll mode; add function to press Ctrl for half scroll speed.| 增加激活“自由滚动区”的条件(可选);增加(激活后)按住 Ctrl 键半速滚动。
20200624|1.17 Add compatibility setting to run on new version of GM; add exception to editable page.| 增加对新版油猴的兼容设置;增加排除可编辑页面的语句。
20220209|1.18 Fix the problem not working on new version of Firefox that uses floating scrollbar.| 修复在新版Firefox浮动滚动条上失效的问题。
本来这脚本只是我放在Userscript.org上,一直更新到十年前的1.16版,然后就忙于工作,基本上很少维护自己的脚本,也很少关注Firefox相关的信息。一次偶然的机会,使用了一个网友的“美化增强版”Firefox新版本,在里面发现了两个我的(严格来说是改进过的)脚本,Ewh和这个。我自己也很久没用这个脚本,于是带着怀念青春的想法用了一下,并且鬼使神差(或者说习惯使然)地打开了其代码,发现里面的作者赫然写着别人的名字,版本号也去到1.50,但是凭着我当年一直维护这脚本的记忆我分明看出了这脚本绝大部分代码都是我的!我拿这脚本的名称在搜索引擎上搜,因为Userscript.org已经关闭了,镜像站Userscript-mirror.org在搜索引擎上排名也不高,排在前面的就是这个同名脚本的作者发布页。通过深度搜索,我没发现同名脚本的其他版本,认定该作者是唯一发布同名脚本的作者。作者总共有三个存放点,一个是本站,一个是github,还有一个(略);在我在本站上发信要求对方补充脚本说明和原作者声明之后,作者选择第一时间删除了前两个存放点,一干二净,但第三个存放点至2020-6-24仍然能下载。我的诉求依然如故,希望他发布的脚本能在发布页面补充脚本说明和原作者声明而已。
放在本站,算是为大家提供“正版”的脚本。
另外,那个同名脚本加了个为手机版Firefox添加返回到页顶的按钮。我认为这跟鼠标滚动的功能并不相关,所以我没将这些代码添加进来。
需要这个功能的,可以使用同站的一个脚本:
For those who need a button to scroll to the top / the bottom of a webpage, there is another script for you:
https://greasyfork.org/zh-CN/scripts/370556-%E4%B8%80%E4%B8%AA%E8%BF%94%E5%9B%9E%E9%A1%B6%E9%83%A8%E5%92%8C%E5%88%B0%E8%BE%BE%E5%BA%95%E9%83%A8%E7%9A%84%E6%8C%89%E9%92%AE