Scroll button Voxer

xdddd

当前为 2020-07-16 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Scroll button Voxer
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description xdddd
  6. // @author Mav3ricK
  7. // @match https://www.voxed.net/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. window.onload = function ()
  12. {
  13.  
  14. var element = document.querySelector('.commentsVoxCount');
  15. var divB = document.createElement("div");
  16. var iconB = document.createElement("i");
  17.  
  18. element.insertBefore(divB, element.childNodes[0]);
  19.  
  20. divB.setAttribute("id", "buttonToDown");
  21. divB.setAttribute("class", "attachButton tooltip-bottom");
  22. divB.addEventListener("click", function() {scrollpage();}, false);
  23.  
  24. divB.appendChild(iconB);
  25. iconB.setAttribute("class", "fas fa-arrow-circle-down");
  26.  
  27. var Height=document.documentElement.scrollHeight;
  28. function scrollpage() {
  29.  
  30. window.scrollTo(0,Height);
  31. }
  32.  
  33. }