您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Disable animation and add up and down button
// ==UserScript== // @name Eink-UpDown // @namespace https://greasyfork.org/users/169007 // @version 1.2.1 // @description Disable animation and add up and down button // @author ZZYSonny // @match *://*/* // @grant none // @run-at document-body // ==/UserScript== (function () { 'use strict'; const body = document.body; const positionCSS = "bottom:0;right:0"; const sizeCSS = "width:15vmin;height:30vmin"; const scrollRatio = 0.9; const Container = document.createElement("div"); Container.style.cssText = ` ${sizeCSS}; ${positionCSS}; position:fixed; display:flex; flex-direction:column; border-style:dashed; z-index:2147483647; border-width:2px; `; const UpButton = document.createElement("div"); UpButton.style.cssText = "flex:1"; UpButton.addEventListener('click', () => { window.scrollBy(0, -scrollRatio * window.innerHeight) }); const DownButton = document.createElement("div"); DownButton.style.cssText = "flex:1;border-top-style:dashed;border-width:2px;"; DownButton.addEventListener('click', () => { window.scrollBy(0, scrollRatio * window.innerHeight) }); Container.appendChild(UpButton); Container.appendChild(DownButton); body.appendChild(Container); })();