// ==UserScript== // @name 四六级成绩修改器 // @name:zh-CN 四六级成绩修改器 // @name:en CET Score Modifier // @namespace https://greasyfork.org/users/1443463 // @version 1.0.1 // @description 四六级成绩查询网站成绩显示修改工具,支持CET4/CET6成绩修改 // @description:zh-CN 用于修改四六级成绩显示的油猴脚本,支持听力、阅读、写作分数修改,适用于全国大学英语四、六级考试成绩查询系统 // @description:en A userscript to modify CET (College English Test) score display on NEEA website // @author 昔日初一 // @match *://cjcx.neea.edu.cn/* // @match *://*.neea.edu.cn/cet/* // @match *://*.neea.cn/cet/* // @grant none // @license MIT // @icon https://www.neea.edu.cn/favicon.ico // @keywords 四六级,CET4,CET6,成绩查询,成绩修改,四级,六级,英语考试,四六级成绩修改器,全国大学英语四六级 // @supportURL https://github.com/xirichuyi/change_the_score_script/issues // @homepageURL https://github.com/xirichuyi/change_the_score_script // @downloadURL https://update.greasyfork.icu/scripts/529173/%E5%9B%9B%E5%85%AD%E7%BA%A7%E6%88%90%E7%BB%A9%E4%BF%AE%E6%94%B9%E5%99%A8.user.js // @updateURL https://update.greasyfork.icu/scripts/529173/%E5%9B%9B%E5%85%AD%E7%BA%A7%E6%88%90%E7%BB%A9%E4%BF%AE%E6%94%B9%E5%99%A8.meta.js // ==/UserScript== (function () { 'use strict'; if (document.readyState === 'loading') { document.addEventListener('readystatechange', function () { if (document.readyState === 'interactive' || document.readyState === 'complete') { onPageLoad(); } }); } else { onPageLoad(); } function onPageLoad() { const savedScores = localStorage.getItem('savedScores'); if (savedScores) { const scores = JSON.parse(savedScores); updateScoresDisplay(scores.listening, scores.reading, scores.writing); setInterval(function () { updateScoresDisplay(scores.listening, scores.reading, scores.writing); }, 10); document.addEventListener('visibilitychange', function () { if (!document.hidden) { updateScoresDisplay(scores.listening, scores.reading, scores.writing); } }); window.addEventListener('focus', function () { updateScoresDisplay(scores.listening, scores.reading, scores.writing); }); } else { createInputInterface(); } } function updateScoresDisplay(listening, reading, writing) { const total_score = document.getElementById('SCORE'); const total_score_1 = document.getElementById('SCO_LC'); const total_score_2 = document.getElementById('SCO_RD'); const total_score_3 = document.getElementById('SCO_WT'); const out_page_score = document.getElementById('achievement-tbody'); // 更新表格中的总分 if (out_page_score) { const firstRow = out_page_score.querySelector('tr:first-child'); if (firstRow) { const thirdCell = firstRow.querySelector('td:nth-child(3)'); if (thirdCell) { thirdCell.innerHTML = String(Number(listening) + Number(reading) + Number(writing)); } } } if (total_score && total_score_1 && total_score_2 && total_score_3) { total_score_1.innerHTML = listening; total_score_2.innerHTML = reading; total_score_3.innerHTML = writing; total_score.innerHTML = String(Number(listening) + Number(reading) + Number(writing)); } } function createInputInterface() { const inputDiv = document.createElement('div'); inputDiv.style.cssText = ` position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); padding: 20px; background: white; border: 1px solid #ccc; border-radius: 5px; z-index: 9999; box-shadow: 0 2px 10px rgba(0,0,0,0.1); text-align: center; `; const html = `