您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
通用返回顶部
当前为
// ==UserScript== // @name [kesai]通用返回顶部 // @namespace http://tampermonkey.net/ // @version 0.3 // @description 通用返回顶部 // @author lizeping // @match https://www.douban.com/* // @match https://movie.douban.com/* // @match https://sspai.com/* // @match https://www.youtube.com/* // @match https://www.baidu.com/* // @match https://www.google.com.hk/* // @grant none // ==/UserScript== (function() { 'use strict'; // Your code here... function addCSS(url) { var link = window.document.createElement('link'); link.rel = 'stylesheet'; link.type = 'text/css'; link.href = url+'?t='+new Date().getTime(); document.getElementsByTagName("HEAD")[0].appendChild(link); } function addScript(url) { var link = window.document.createElement('script'); link.type = 'text/javascript'; link.src = url+'?t='+new Date().getTime(); link.async = true; document.getElementsByTagName("HEAD")[0].appendChild(link); } if (typeof jQuery == 'undefined') { addScript("https://code.jquery.com/jquery-3.3.1.min.js"); } addCSS("https://kesai.github.io/returnTop/share.css"); window.onload = function() { var div = $('<div id="share"><a id="totop" title="返回顶部">返回顶部</a></div>'); $("body").append(div); $("#totop").hide(); $(window).scroll(function() { if ($(window).scrollTop() > 100) { $("#totop").fadeIn(); } else { $("#totop").fadeOut(); } }); $("#totop").click(function() { $('body,html').animate({ scrollTop: 0 }, 500); return false; }); } })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址