Greasy Fork

Greasy Fork is available in English.

双击网页自动滑动,自动阅读

双击左上角的椭圆,开始屏幕向下滑动,可自定义速度,速度范围-10~10(默认速度为1)。双击滑动开始或停止。上下键实时调速度。

当前为 2018-11-19 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         双击网页自动滑动,自动阅读
// @namespace    https://github.com/zhchjiang95
// @version      0.1.3
// @description  双击左上角的椭圆,开始屏幕向下滑动,可自定义速度,速度范围-10~10(默认速度为1)。双击滑动开始或停止。上下键实时调速度。
// @author       zhchjiang95 <[email protected]>
// @include      http://*
// @include	     https://*
// @require      https://code.jquery.com/jquery-3.3.1.min.js
// @match        http://*
// @match        https://*
// @grant        none
// ==/UserScript==

var box = $('<div class="move-box" title="双击开始(停止)自动滚动页面"><input type="number" class="move-val" value="1" /></div>');
$('body').append(box);
(function(){
    $('.move-box').css({
        'width': '40px',
        'height': '30px',
        'position': 'fixed',
        'top': '80px',
        'left': '10px',
        'z-index': 99999999
    });
    $('.move-val').css({
        'width': 'inherit',
        'height': 'inherit',
        'color': '#ffffff',
        'background': 'orange',
        'opacity': 0.3,
        'border': 'none',
        'outline': 'none',
        'border-radius': '50%',
        'font-size': '18px',
        'text-align': 'center'
    })
}())
var elinput = document.getElementsByClassName('move-val')[0],
    speed = 1,
    timer = null,
    isMove = false;
elinput.oninput = function(){
    if(this.value > 10){
        this.value = 10;
    }
    if(this.value < -10){
        this.value = -10;
    }
    if(this.value == ''){
        this.value = 0;
    }
    speed = Number(this.value);
}
elinput.ondblclick = function(){
    if(isMove){
        clearInterval(timer);
        isMove = false;
    }else{
        timer = setInterval(move,20);
        isMove = true;
    }
}
function move(){
    window.scrollBy(0,speed);
    if($(window).height()+$(window).scrollTop()>=$(document).height()-2 || $(window).scrollTop() == 0){
        clearInterval(timer);
        isMove = false;
    }
}