// ==UserScript== // @name 查看卷面分和平时分 // @namespace ershi_juanmianfen // @version 0.2 // @description 二师教务系统查看卷面分和平时分 // @author ljn // @match http://jwc.cque.edu.cn/jsxsd/kscj/cjcx_list // @match http://jwc.cque.edu.cn/jsxsd/kscj/pscj_list* // @icon https://www.google.com/s2/favicons?domain=cque.edu.cn // @grant none // @require https://cdn.staticfile.org/jquery/3.4.1/jquery.min.js // @downloadURL https://update.greasyfork.icu/scripts/429292/%E6%9F%A5%E7%9C%8B%E5%8D%B7%E9%9D%A2%E5%88%86%E5%92%8C%E5%B9%B3%E6%97%B6%E5%88%86.user.js // @updateURL https://update.greasyfork.icu/scripts/429292/%E6%9F%A5%E7%9C%8B%E5%8D%B7%E9%9D%A2%E5%88%86%E5%92%8C%E5%B9%B3%E6%97%B6%E5%88%86.meta.js // ==/UserScript== (function() { 'use strict'; $(document).ready(function() { if(window.location.pathname == "/jsxsd/kscj/cjcx_list") { var user = $('#dataList').children().eq(0).children().eq(1).children().eq(4).contents().eq(3)[0].data.trim().match(/id=(\d*)&jx/)[1] var ainput = '' var arr = [] $('#dataList').children().eq(0).children().eq(0).children().last().text("查看卷面分/平时分") for (var i = 1; i < $('#dataList').children().eq(0).children().length; i++) { var a1 = $('#dataList').children().eq(0).children().eq(i).children().eq(4).contents().eq(3)[0].data.trim().match(//)[1] ainput = $("").text(user) var a4 = `` $('#dataList').children().eq(0).children().eq(i).children().last().append(a4) $('#dataList').children().eq(0).children().eq(i).children().last().append(ainput) var a3 = $('#dataList').children().eq(0).children().eq(i).children().last().children().eq(1) a3.val(user) var a2 = $('#dataList').children().eq(0).children().eq(i).children().last().children().eq(0) a2.css("background", "#3390ff") a2.css("width", "100%") a2.css("height", "30px") a2.css("color", "#fff") a2.css("display", "block") a2.css("text-align", "center") a2.css("line-height", "30px") a2.text("点击查看") arr.push(Number($('#dataList').children().eq(0).children().eq(i).children().eq(4).text().replace(/\D/g, ""))) } console.log(arr) var zongcj = 0 for(i = 0; i < arr.length; i++) { zongcj += arr[i] } var newtd = `