东大4分制GPA计算方法:
绩点>=3.5 GPA = 4
绩点>=2.5 GPA = 3
绩点>=1 GPA = 2
此成绩转换方法来自东大国际处,仅供参考
如需确认或证明请自行前往国际处询问

程序计算绩点和系统绩点相同则表明GPA计算无误

使用方法:
将下方程序代码复制并添加到油猴插件的新脚本中
登录东北大学综合教务系统之后,可在页面右侧看到悬浮窗口

点击“点此查看东大版GPA”即可跳转到成绩界面并显示结果

程序代码:

// ==UserScript==
// @name         智慧东大留学成绩小助手
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        http://219.216.96.4/eams/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    var x;
    var jidian_sum=0;
    var credit_sum=0;
    var GPA_sum = 0;
    var table = document.getElementById("grid21344342991");
    if(table === null) table = document.getElementById("grid18648965881");
    if(table === null){
        let suckIt = `<div style="position: fixed;top: 50%;z-index: 999;right: 10%;padding: 1em;background: rgba(233,233,233);border: 1px solid #aaa;">
        <p style="text-align: center;">
        <a href="http://219.216.96.4/eams/teach/grade/course/person!historyCourseGrade.action?projectType=MAJOR">
        <button style="border: 1px solid #aaa;padding: 5px;color: #3a6dd2;cursor: pointer;">点此查看东大版GPA</button>
        </a>
        <p>脚本作者:Gabriel</p>
        <p>个人网站:<a href="https://gabriel-1023.github.io/" target="_blank">https://gabriel-1023.github.io/</a></p>
        </p>
        </div>`;
        document.body.insertAdjacentHTML("afterbegin", suckIt);
    }
    else{
            // console.log(table);
            for(var i=1;i<table.rows.length;i++)
            {
                var grade = table.rows[i].cells[11].innerHTML.replace(/	/g,"").replace(/\n/g,"");
                if(grade === "--") continue;
                var credit = Number(table.rows[i].cells[6].innerHTML);
                var jidian = Number(table.rows[i].cells[12].innerHTML.replace(/	/g,"").replace(/\n/g,""));
                console.log("成绩:"+grade+" 学分:"+credit+" 绩点:"+jidian);
                jidian_sum = jidian_sum+jidian*credit;
                credit_sum = credit_sum+credit;
                //console.log("学分:"+credit+" 绩点:"+jidian);
                if(jidian>=3.5)
                {
                    GPA_sum = GPA_sum+4*credit;
                }
                else if(jidian >=2.5)
                {
                    GPA_sum=GPA_sum+3*credit;
                }
                else if(jidian>=1)
                {
                    GPA_sum = GPA_sum+2*credit;
                }
            }
            var zongjidian=jidian_sum/credit_sum
            var GPA = GPA_sum/credit_sum
            console.log(GPA);
            var text = document.querySelector("body > div:nth-child(3)")
            //console.log(text);
            let suckIt = `<div style="position: fixed;top: 30%;z-index: 999;left: 10%;padding: 1em;background: rgba(233,233,233);border: 1px solid #aaa;">
            <p>东大版GPA计算方法:</p>
            <p>绩点>=3.5 GPA = 4</p>
            <p>绩点>=2.5 GPA = 3</p>
            <p>绩点>=1    GPA = 2</p>
            <p>此成绩转换方法来自东大国际处,仅供参考</p>
            <p>如需确认或证明请自行前往国际处询问</p>
            <p>程序得出绩点:`+zongjidian.toFixed(5)+`</p>
            <p>绩点和系统绩点相同则表明GPA计算无误</p>
            <p>程序得出东大版GPA:`+GPA.toFixed(5)+`</p>
            <p>脚本作者:Gabriel</p>
            <p>个人网站:<a href="https://gabriel-1023.github.io/" target="_blank">https://gabriel-1023.github.io/</a></p>
            </div>`;
        document.body.insertAdjacentHTML("afterbegin", suckIt);
            //text.innerHTML = "总绩点:"+zongjidian.toFixed(5)+" 东大版GPA:"+GPA.toFixed(5);
    }
})();