Ruby REx

You can turn page by left and right key shortcut. 左右のキーで、ページを移動できます。

  1. // ==UserScript==
  2. // @name Ruby REx
  3. // @name:ja RExのページ移動をキーボード操作で
  4. // @namespace https://greasyfork.org/ja/users/570127
  5. // @version 1.0.0
  6. // @description You can turn page by left and right key shortcut. 左右のキーで、ページを移動できます。
  7. // @description:ja RExで、右キーで「解答する」、左キーで「前の問題へ」となります。
  8. // @author universato
  9. // @license MIT
  10. // @match https://rex.libertyfish.co.jp/exam_histories/*
  11. // @supportURL https://twitter.com/universato
  12. // ==/UserScript==
  13.  
  14. (function() {
  15. document.addEventListener('keydown', function (event) {
  16. if (event.key === 'ArrowLeft'){
  17. document.querySelector('a.pull-left').click(); // 前の問題へ
  18. }else if(event.key === 'ArrowRight'){
  19. document.querySelector('input.pull-right').click(); // 解答する
  20. }
  21. });
  22. })();