pageup/pagedown button

try to take over the world!

  1. // ==UserScript==
  2. // @name pageup/pagedown button
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.17
  5. // @description try to take over the world!
  6. // @author zjsxwc
  7. // @match http://*
  8. // @match https://*/*
  9. // @match https://*.com/*
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. //var html2 = $("body").html().replace(/script/g, "scpt"); $("body").html(html2);
  17.  
  18. window.pageup = function pageup() {
  19. scrollBy(0, -window.screen.availHeight*0.85);
  20. }
  21.  
  22. window.pagedown = function pagedown() {
  23. scrollBy(0, window.screen.availHeight*0.85);
  24. }
  25.  
  26. window.pagetop = function pagetop() {
  27. scrollTo(0, 10);
  28. }
  29.  
  30. //工具条
  31. var tool_bar = $('<div id="tool-bar" style="top:45%;right:0px;position:fixed;float:right;font-size:0.5em;z-index: 9999999;"></div>');
  32. tool_bar.append("<p style='float:right'><div id='up' onclick='pageup()' style=\"background-color: rgba(243,0,0,0.3);margin-bottom: 30px;height: 25px;z-index: 9999999;\">UP</div></p>");
  33. tool_bar.append("<p style='float:right'><div id='down' onclick='pagedown()' style=\"background-color: rgba(243,0,0,0.3);margin-bottom: 50px;height: 25px;z-index: 9999999;\">DOWN</div></p>");
  34. tool_bar.append("<p style='float:right'><div id='top' onclick='pagetop()' style=\"background-color: rgba(243,0,0,0.3);margin-bottom: 30px;height: 25px;z-index: 9999999;\">TOP</div></p>");
  35. $('body').append(tool_bar);
  36.  
  37. document.body.style.backgroundColor="white";
  38. $('#undefined').hide();
  39.  
  40. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址