您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Отображение среднего балла в журнале СФ УУНиТ
// ==UserScript== // @name Средний балл СФ УУНиТ // @namespace https://github.com/WolfySoCute // @version 0.4.3 // @description Отображение среднего балла в журнале СФ УУНиТ // @author Wolfy // @match *://account.struust.ru/Journals/DisciplineGrades/* // @match *://account.strbsu.ru/Journals/DisciplineGrades/* // @match *://account.str.uust.ru/Journals/DisciplineGrades/* // @icon https://account.str.uust.ru/favicon.ico // @grant none // @license GNU GPLv3 // ==/UserScript== (function() { 'use strict'; const journalNode = document.querySelector(".journal-student"); const grades = []; if (journalNode) { for (const tr of journalNode.getElementsByTagName('tr')) { const gradeNode = tr.getElementsByClassName('journal-student-central')[2]; if (gradeNode) { const grade = gradeNode.textContent.split(' / '); if (!isNaN(parseFloat(grade[0]))) grades.push(...grade.map(parseFloat)); } } if (grades.length){ const sum = grades.reduce((partialSum, a) => partialSum + Number(a), 0); const newTr = document.createElement('tr'); newTr.innerHTML = `<td colspan="3" class="journal-student-central"><strong>Средний балл:</strong></td><td class="journal-student-central">${(sum / grades.length).toFixed(2)}</td>`; journalNode.firstElementChild.appendChild(newTr); } } })();