WaniKani Item Info Expander

Expands item info automatically without scrolling

目前为 2017-04-25 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name WaniKani Item Info Expander
  3. // @namespace mvi
  4. // @description Expands item info automatically without scrolling
  5. // @include https://www.wanikani.com/review/session
  6. // @version 0.2
  7. // @run-at document-end
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function () {
  12. 'use strict';
  13. function noscroll() {
  14. window.scrollTo( 0, 0 );
  15. }
  16.  
  17. var oldEvaluate = answerChecker.evaluate;
  18. answerChecker.evaluate = function(e,t) {
  19. // add listener to disable scroll
  20. window.addEventListener('scroll', noscroll);
  21.  
  22. // expand item info
  23. setTimeout(function () {
  24. $('#option-item-info').click();
  25. }, 100);
  26.  
  27. // Remove listener to disable scroll
  28. setTimeout(function () {
  29. window.removeEventListener('scroll', noscroll);
  30. }, 1000);
  31. return oldEvaluate(e,t);
  32. };
  33. console.log('WaniKani Item Info Expander: script load end');
  34. }());

QingJ © 2025

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