您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
override shake effect to instead flash yellow
当前为
// ==UserScript== // @name WaniKani Shake Flash Yellow // @namespace https://www.wanikani.com // @description override shake effect to instead flash yellow // @version 0.1.1 // @include https://www.wanikani.com/review/session // @include http://www.wanikani.com/review/session // @run-at document-end // @grant none // ==/UserScript== /*global $, console*/ (function () { 'use strict'; $.curCSS = $.css; $.effects.shake = function (o) { var elem = $('#answer-form input'); return elem.queue(function () { var props = ['backgroundImage', 'backgroundColor', 'opacity'], animation = { backgroundColor: elem.css('backgroundColor') }; $.effects.save(elem, props); elem .show() .css({ backgroundImage: 'none', backgroundColor: '#ffff00' }) .animate(animation, { queue: false, duration: 1000, complete: function () { $.effects.restore(elem, props); if (o.callback) { o.callback.apply(this, arguments); } elem.dequeue(); } }); }); }; console.log('WaniKani Shake Flash Yellow: script load end'); }());