您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Automatically click the info button upon wrong review answer.
- // ==UserScript==
- // @name WaniKani Review Wrong Info Click
- // @namespace https://www.wanikani.com
- // @description Automatically click the info button upon wrong review answer.
- // @version 0.1.0
- // @include https://www.wanikani.com/review/session
- // @include http://www.wanikani.com/review/session
- // @run-at document-end
- // @grant none
- // ==/UserScript==
- /*global $, console*/
- /*
- hook wrongCount jStorage
- upon field update with increased value
- automatically click the show info button
- after a slight delay (to avoid a display glitch)
- */
- (function () {
- 'use strict';
- var lastWrongCount = 0;
- $.jStorage.listenKeyChange('wrongCount', function (key, action) {
- var wrongCount;
- if (action === 'updated') {
- wrongCount = $.jStorage.get('wrongCount');
- if (wrongCount > lastWrongCount) {
- setTimeout(function () {
- $('#option-item-info').click();
- }, 100);
- }
- lastWrongCount = wrongCount;
- }
- });
- console.log('WaniKani Review Wrong Info Click: script load end');
- }());