您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
PC端知能行辅助刷题工具,“回车”确认答案、下一题;“+”展示题解;“-”关闭题解窗口
// ==UserScript== // @name 知能行 辅助脚本 // @namespace http://tampermonkey.net/ // @version 0.1 // @description PC端知能行辅助刷题工具,“回车”确认答案、下一题;“+”展示题解;“-”关闭题解窗口 // @author YYForReal // @match https://app.bestzixue.com/* // @grant none // ==/UserScript== (function() { 'use strict'; document.body.addEventListener("keydown",(event)=>{ var continueButton = document.getElementById("continueButton"); var closeSolutionModalIcon = document.getElementById("closeSolutionModalIcon"); var solutionButton = document.getElementById("solutionButton"); var checkAnswerButton = document.getElementById("checkAnswerButton"); var tryAgainButton = document.getElementById("tryAgainButton"); var answer = document.getElementById("answer"); //找关闭按钮 var MuiDialog = document.getElementsByClassName("MuiDialog-root"); var buttons = document.getElementsByTagName("button"); if(event.keyCode == 13){// enter if(tryAgainButton !=null){ console.log("tryAgain") tryAgainButton.click(); } if(checkAnswerButton !=null){ console.log("check"); checkAnswerButton.click(); } else if(continueButton !=null){ console.log("continue"); continueButton.click(); } // continueButton.click(); }else if(event.keyCode == 107){// + if(solutionButton!=null){ solutionButton.click(); } }else if(event.keyCode == 109){ for(let i=0;i<buttons.length;i++){ closeSolutionModalIcon = buttons[i]; if(closeSolutionModalIcon != null && closeSolutionModalIcon.id == "closeSolutionModalIcon"){ console.log("close"); closeSolutionModalIcon.click(); } } } answer.focus(); }) })();