您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
try to take over the world!
// ==UserScript== // @name 安徽工业大学教务系统计算GPA // @namespace http://tampermonkey.net/ // @version 0.2 // @description try to take over the world! // @author Z // @match http://jwxt.ahut.edu.cn/jsxsd/kscj/cjcx_list // @grant none // ==/UserScript== (function() { 'use strict'; // Your code here... var mytable=document.querySelector("#dataList") if(mytable && mytable.rows[1].cells[0].innerText!="未查询到数据"){ var sumCredits=0//定义总学分 var totalScore=0//定义总成绩 for (var i=1;i<mytable.rows.length;i++){ if(!isNaN(parseFloat(mytable.rows[i].cells[6].innerText))){ sumCredits+=parseFloat(mytable.rows[i].cells[8].innerText) totalScore+=parseFloat(mytable.rows[i].cells[8].innerText)*parseFloat(mytable.rows[i].cells[6].innerText)}} var gpa= totalScore/sumCredits alert("您的平均学分绩是"+gpa.toFixed(2))} })();