Greasy Fork 支持简体中文。

Questionable Content Navigation Improvements

Adds arrow keys control.

目前為 2014-06-02 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name Questionable Content Navigation Improvements
  3. // @namespace http://userscripts.org/users/Scuzzball
  4. // @description Adds arrow keys control.
  5. // @include http://questionablecontent.net/view.php?comic=*
  6. // @grant none
  7. // @version 1.0
  8. // ==/UserScript==
  9.  
  10.  
  11.  
  12.  
  13. function leftArrowPressed() {
  14. window.location = document.getElementById('comicnav').children[1].children[0].href;
  15. }
  16.  
  17. function rightArrowPressed() {
  18. window.location = document.getElementById('comicnav').children[2].children[0].href;
  19. }
  20.  
  21. document.onkeydown = function(evt) {
  22. evt = evt || window.event;
  23. switch (evt.keyCode) {
  24. case 37:
  25. leftArrowPressed();
  26. break;
  27. case 39:
  28. rightArrowPressed();
  29. break;
  30. }
  31. };