您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Add button to return top of each page.
当前为
// ==UserScript== // @name Back to Top figuccio // @author figuccio // @namespace https://gf.qytechs.cn/users/237458 // @description Add button to return top of each page. // @version 0.5 // @include * // ==/UserScript== // Create black to top. var a = document.createElement('span'); a.innerHTML = "🡹"; var c = "position:fixed;text-align:right;right:170px;bottom:2px;z-index:50000;"; c+='color:red!important;background-color:green;border:2px solid blue;padding:6px 15px;font-size:11pt;cursor:pointer;font-weight:bold;text-decoration:none;border-top-right-radius:12px;border-top-left-radius:12px;box-shadow:0 0 6px rgba(0,0,0,.5);'; a.style.cssText = c; a.addEventListener('click', function(){ window.scrollTo(0,0); }, false); document.body.appendChild(a); //pulsante in basso var newHeight = document.body.scrollHeight; var b = document.createElement('span'); b.addEventListener('click', function(){ window.scrollTo(0,newHeight); }, false); document.body.appendChild(b); var lastScrollY=0; (function gotop(){ var diffY; diffY = document.documentElement.scrollTop+document.body.scrollTop; percent=.1*(diffY-lastScrollY); if(percent>0)percent=Math.ceil(percent); else percent=Math.floor(percent); lastScrollY=lastScrollY+percent; if(lastScrollY>500){ a.style.display="block";b.style.display="block"; } else { b.style.display="block";a.style.display="none"; } setTimeout(gotop,1); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址