Scroll and click Next chapter timeless leaf with right button keyboard

try to make your life easier!

当前为 2019-10-07 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Scroll and click Next chapter timeless leaf with right button keyboard
  3. // @namespace https://openuserjs.org/users/Riztard/scripts
  4. // @version 0.4
  5. // @description try to make your life easier!
  6. // @author Riztard
  7. // @match *timelessleaf.com*
  8. // @include *timelessleaf.com*
  9. // @license MIT
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. (function () {
  14. 'use strict';
  15.  
  16. window.onkeydown = function (event) {
  17. if (event.keyCode === 39) {
  18.  
  19. var el = document.getElementById('gallery-1');
  20. el.scrollIntoView(false);
  21. window.scrollBy(0, 200)
  22. window.location.href = document.getElementsByClassName("entry-content")[0].getElementsByTagName("a")[0].getAttribute("href");
  23. }
  24. };
  25. })();