// ==UserScript== // @name 教学质量自动考评 // @namespace http://tampermonkey.net/ // @version 0.1 // @description 教学质量自动考评脚本 // @author Jozhn // @require http://cdn.bootcss.com/jquery/1.8.3/jquery.min.js // @match *://zhjw.neu.edu.cn/* // @supportURL https://dearjohn.cn // @grant none // @downloadURL none // ==/UserScript== (function() { 'use strict'; $(document).ready(function(){ //添加按钮 var btn1_html = ''; var btn2_html = ''; var btn3_html = ''; $("legend:first").append(btn1_html,btn2_html,btn3_html); $("#btn1").click(function(){ $(":radio").each(function(){ if($(this).val()=="95"){ $(this).click(); } }); $(":radio").each(function(){ if($(this).val()=="85"){ $(this).click(); return false; } }); }); $("#btn2").click(function(){ $(":radio").each(function(){ var arr = ["95","85","75","65","50"] if($(this).val()==arr[Math.floor((Math.random()*arr.length))] ){ $(this).click(); } }); }); $("#btn3").click(function(){ $(":radio").each(function(){ if($(this).val()=="50"){ $(this).click(); } }); $(":radio").each(function(){ if($(this).val()=="65"){ $(this).click(); return false; } }); }); }); })();