您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
一键到顶、到底; 电脑端、移动端通用。
// ==UserScript== // @name 安乐传 // @author Jones Miller // @version 23.04.01 // @namespace https://t.me/jsday // @description 一键到顶、到底; 电脑端、移动端通用。 // @include * // @grant unsafeWindow // ==/UserScript== (function() { 'use strict'; function s(i){ window.scrollTo(0,i);}; var jmfortop=document.createElement("div"); jmfortop=document.body.appendChild(jmfortop); jmfortop.innerHTML=' <head> <style type="text/css"> #jmchuan { position:fixed; display:block; width:49px; height:88px; bottom:30px; right:-60px; background:transparent !important; z-index:100000; transition:.5s all; border-radius:10px;} #jmchuan div { position:absolute; width:100%; height:49%; background:rgba(0,0,0,0.5) url(https://g.csdnimg.cn/side-toolbar/2.9/images/fanhuidingbucopy.png) no-repeat center !important; background-size:18px !important; border-radius:10px;} #jmchuan div:hover { background-color:red !important; background-size:26px !important;} </style> </head> <body> <div id="jmchuan"> <div id="jmgotop" style="top:0;"></div> <div id="jmgobtn" style="bottom:0;transform:rotate(180deg);"></div> </div> </body>'; window.onscroll=function() { scrollFunction();}; function scrollFunction() { if (document.body.scrollTop > 149 || document.documentElement.scrollTop > 149 ) { jmchuan.style.right='10px'; } else { jmchuan.style.right='-60px'; } } jmgotop.onclick=()=>{ s(0); }; jmgobtn.onclick=()=>{ s(document.body.scrollHeight); }; })();