您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
2023/9/16 上午9:40:49
// ==UserScript== // @name 云开 - 在线作业 // @namespace Violentmonkey Scripts // @match https://teach.ynou.edu.cn/hw/student/studentStartHomework.action* // @require https://cdn.staticfile.org/jquery/3.6.3/jquery.min.js // @grant none // @version 1.2 // @license MIT // @author - // @description 2023/9/16 上午9:40:49 // ==/UserScript== (function ($) { 'use strict'; // 获取试卷ID var url = `https://teach.ynou.edu.cn/hw/student/studentViewHomework.action?paper_id=${paper_id}&studentClass=${studentClass}` $.get(url, function(data, status, jqXHR) { // 获取试卷试题ID $('input[type="radio"]').each(function() { // 获取当前 <input> 元素的 id 属性 var inputId = $(this).attr('id'); var da = $(data).find("#"+inputId+"_right_answer font").text() if($(this).attr('value') == da){ // 输出 id 属性 console.log('Input ID:', $(this)); $(this).click() } }); // 获取试卷试题ID $('input[type="checkbox"]').each(function() { // 获取当前 <input> 元素的 id 属性 var inputId = $(this).attr('id'); var da = $(data).find("#"+inputId+"_right_answer font").text() if(da.includes($(this).attr('value'))){ // 输出 id 属性 console.log('Input ID:', $(this)); $(this).click() } }); }); })(jQuery.noConflict(true));