找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 文档 工具 设计
查看: 156|回复: 0

[经验之谈] 国资E学快速学习课程

[复制链接]

1万

主题

1160

回帖

2万

积分

超级版主

教育辅助界扛把子

附加身份标识
精华
1
热心
5
听众
1
威望
53
贡献
13511
违规
0
书币
4174
注册时间
2020-4-8

论坛元老灌水之王

发表于 2024-5-23 17:17 | 显示全部楼层 |阅读模式
国资E学里面的课程,可使用油猴脚本快速学完。
使用方法
安装油猴脚本(略)
添加自定义脚本

[AppleScript] 纯文本查看 复制代码
// ==UserScript==
// @name         国资E学
// @namespace    http://tampermonkey.net/
// @version      2024-05-13
// @description  try 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[0].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了

Great works are not done by strength, but by persistence! 历尽艰辛的飞升者,成了围剿孙悟空的十万天兵之一。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则 需要先绑定手机号


免责声明:
本站所发布的第三方软件及资源(包括但不仅限于文字/图片/音频/视频等仅限用于学习和研究目的;不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负。本站信息来自网络,版权争议与本站无关。您必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容。如果您喜欢某程序或某个资源,请支持正版软件及版权方利益,注册或购买,得到更好的正版服务。如有侵权请邮件与我们联系处理。

Mail To: admin@cdsy.xyz

QQ|Archiver|手机版|小黑屋|城东书院 ( 湘ICP备19021508号-1|湘公网安备 43102202000103号 )

GMT+8, 2024-9-8 08:51 , Processed in 0.039688 second(s), 28 queries .

Powered by Discuz! CDSY.XYZ

Copyright © 2019-2023, Tencent Cloud.

快速回复 返回顶部 返回列表