国资E学快速学习课程
国资E学里面的课程,可使用油猴脚本快速学完。使用方法
安装油猴脚本(略)
添加自定义脚本
// ==UserScript==
// @name 国资E学
// @namespace http://tampermonkey.net/
// @version 2024-05-13
// @descriptiontry to take over the world!
// @AuThor You
// @match https://elearning.tcsasac.com/
// @Icon https://www.google.com/s2/favicons?sz=64&domain=tcsasac.com
// @require https://scriptcat.org/lib/637/1.4.0/ajaxHooker.js#sha256=2yxSlbNRgvhzRczZ32IEACTSHFaqFtO6VtLu769ZBdM=
// @grant none
// ==/UserScript==
(function() {
'use strict';
console.log(location.hash);
let matchs = /#\/home\/courseDetail\/(.+)\/(.+)$/.exec(location.hash);
if(matchs){
console.log(matchs);
ajaxHooker.filter([
{type: 'xhr', method: 'POST', async: true, url: "learn/app/clientapi/course/queryCourseDetail.do"},
{type: 'xhr', method: 'POST', async: true, url: "/learn/app/clientapi/course/progress/reportLearnProgress.do"},
]);
ajaxHooker.hook(async request => {
console.log('req',request);
if(request.url.indexOf("/learn/app/clientapi/course/queryCourseDetail.do?os=") === 0){
request.response = async res => {
//res.responseText = await res.responseText;
let json = JSON.parse(res.responseText);
json.body.completionReportInterval = 1;
res.responseText = JSON.stringify(json);
console.log('res', json);
//console.log("coursewareId", json.courseFileArr.coursewareId);
};
}
else if(request.url.indexOf("/learn/app/clientapi/course/progress/reportLearnProgress.do?os=") === 0){
let json = JSON.parse(request.data);
json.isPlayEnd = 1;
json.latestTime = $('video').get(0).duration + 60;
request.data = JSON.stringify(json);
setTimeout(()=>alert("已经学完了"),100);
}
});
}
// Your code here...
})();
学习视频,然后等待弹出对话框,就学完这课程了。如果你着急,可以尝试拖动一下进度条,会立即弹出“学完了”的提示框。
OK了
页:
[1]