// ==UserScript== // @name 南宁师范大学自动教评 // @namespace 自动教评 // @version 1.4 // @description QQ 592530326 752381473 // @author 计17级专升本懒人 // @match http://210.36.80.160/* // @grant none // @require http://libs.baidu.com/jquery/2.0.0/jquery.min.js //@rewritten_script_code javascript // @downloadURL none // ==/UserScript== var $ = $ || window.$; var url = window.location.href; var qwe =""; (function() { qwe=url.split("?"); if(qwe[0]=="http://210.36.80.160/jsxsd/xspj/xspj_list.do"){ window.showModalDialog = function(a,b,c){ window.open(a); } } if (qwe[0] == "http://210.36.80.160/jsxsd/xspj/xspj_edit.do") { console.log(localStorage.getItem("A"), localStorage.getItem("B")); var a = document.getElementById("table1"); if(localStorage.getItem("A")=="null"||localStorage.getItem("A")==null || localStorage.getItem("B")=="null"||localStorage.getItem("B")==null){ }else{ for (var i = 0; i < a.children[0].children.length; i++) { if (i == a.children[0].children.length - 2) { var b = localStorage.getItem("B"); b= parseInt(b)*2; a.children[0].children[i].children[1].children[b].checked = true; console.log(i); } else { var c = localStorage.getItem("A"); c= parseInt(c)*2; if (a.children[0].children[i].children[1].children[0] != undefined) { console.log(i); a.children[0].children[i].children[1].children[c].checked = true; } } } document.getElementById("issubmit").value = "1"; document.getElementById("Form1").submit(); localStorage.removeItem('A'); localStorage.removeItem('B'); } } })(); $(document).ready(function(){ qwe=url.split("?"); if(qwe[0]=="http://210.36.80.160/jsxsd/xspj/xspj_list.do"){ var newItem2 = '
请选择默认教评的选项
'+ '默认选项'+
'
最后一项'+
'
'+ '