您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
A set of custom events which make it easier to detect changes on the page.
当前为
此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.greasyfork.icu/scripts/370623/981650/Bunpro%3B%20Helpful%20Events.js
// ==UserScript== // @name Bunpro; Helpful Events // @namespace http://tampermonkey.net/ // @version 1.0.2 // @author Kumirei // @require http://greasyfork.icu/scripts/432418-wait-for-selector/code/Wait%20For%20Selector.js?version=974366 // @include *bunpro.jp* // @exclude *community.bunpro.jp* // ==/UserScript== (function (wfs) { // Add a custom event for when BP creates a new body var newBody = new Event("new-body"); wfs.wait("body > header", function (e) { fireEvent(newBody); }); // Add a custom event for when you get a new item in reviews var newReviewItem = new Event("new-review-item"); wfs.wait(".level_lesson_info a", function (e) { fireEvent(newReviewItem); }); // Add a custom event when you go to study or cram page var quizPage = new Event("quiz-page"); wfs.wait("#show-grammar", function (e) { fireEvent(quizPage); }); // Add a custom event when you go to study page var studyPage = new Event("study-page"); wfs.wait("#study-page #show-grammar", function (e) { fireEvent(studyPage); }); // Add a custom event when you go to cram page var cramPage = new Event("cram-page"); wfs.wait("#cram-page #show-grammar", function (e) { fireEvent(cramPage); }); // Fires the given event on the HTML element function fireEvent(event) { var retryInterval = setInterval(function () { if (document.readyState == "complete") { $("HTML")[0].dispatchEvent(event); clearInterval(retryInterval); } }, 100); } })(window.wfs);