Greasy Fork is available in English.
南方教师在线刷课页面自动标记答案的选项。
// ==UserScript==
// @name 南方教师在线答案标记
// @namespace http://southteacher.goodbye.xxx/
// @license WTFPL
// @version 2025-12-11
// @description 南方教师在线刷课页面自动标记答案的选项。
// @author underbed
// @match https://ycourse.ttcn.cn/study/studyWorkVideo*
// @match https://ycourse.ttcn.cn/study/RateLearning*
// @match https://ycourse.ttcn.cn/study/studyIndex*
// @match https://ycourse.ttcn.cn/study/home*
// @icon https://www.google.com/s2/favicons?sz=64&domain=ttcn.cn
// @grant none
// @run-at document-start
// ==/UserScript==
(function () {
"use strict";
const originOpen = XMLHttpRequest.prototype.open;
XMLHttpRequest.prototype.open = function (_, url) {
if (url.includes("video-videoinfo/getVideoInfo")) {
this.addEventListener("readystatechange", function () {
if (this.readyState === 4) {
const res = JSON.parse(this.responseText);
if (res && res.data && res.data.videoQas) {
res.data.videoQas.forEach((qas) => {
if (qas && qas.optionList) {
qas.optionList.forEach((option) => {
if (option.isAnswer == "Y") {
option.optionContent += " (答案)";
}
});
}
});
}
console.log("挟持题目数据", res);
Object.defineProperty(this, "responseText", {
writable: true,
});
this.responseText = JSON.stringify(res);
}
});
}
originOpen.apply(this, arguments);
};
})();