破解立知(Lite)

破解立知课堂工具简化版(由上海市某中学的多位青年共同开发、支持、调试和维护)

目前为 2022-06-13 提交的版本。查看 最新版本

// ==UserScript==
// @name         破解立知(Lite)
// @namespace    https://ez118.github.io/
// @version      1.5
// @description  破解立知课堂工具简化版(由上海市某中学的多位青年共同开发、支持、调试和维护)
// @author       ZZY_WISU
// @match        https://*.imlizhi.com/slive/pc/*
// @license      GNU GPLv3
// @icon         https://edu.seewo.com/res/head/1/default.png
// @run-at document-end
// @grant        GM_registerMenuCommand
// @grant        GM_unregisterMenuCommand
// ==/UserScript==


let menu1 = GM_registerMenuCommand('浏览教师课件', function () {
    function ShowCourseware(filelist){var dochtml="";var MaxPageNum=200; var PageCnt=0; var result=filelist; var obj=[]; filelist=eval("("+result+")");var win=window.open();if(filelist.message!="error"){for(var i=0;i<=MaxPageNum;i++){try{obj[filelist.data[i].pageIndex]=filelist.data[i].downloadUrl}catch{}}for(i=0;i<=MaxPageNum;i++){if(obj[i]!=undefined){dochtml+="<img src='"+obj[i]+"' title='第"+(i+1)+"页'><br>";PageCnt+=1}}var script=`<script>function printmode(){document.getElementsByClassName("msg")[0].remove();document.getElementsByTagName("style")[0].innerText="img{width:100%;margin-top:15px;}"}</script>`;var header=`<title>课件浏览器</title><meta charset="utf-8"><style>body{background-color:rgb(50,54,57);user-select:none;margin:0px}.ctrl{font-size:14px;border-radius:15px;padding:5px;padding-left:13px;padding-right:13px;background-color:rgb(51,51,51);color:#FFF;border:1px solid#CCC}.msg{position:fixed;top:15px;left:15px;z-index:5}img{width:60%;min-width:600px;margin-top:10px;border-radius:4px}.printBtn{margin:10px}a{color:#FFF;text-decoration:none}</style>`;var body=`<body><div class="ctrl msg"> 共`+PageCnt+`页 </div><center>`+dochtml+`<button onclick="this.remove();printmode();"class="ctrl printBtn">打印 & PDF存储模式</button></center></body>`;win.document.write(header+script+body)}else{win.document.write("<title>出现问题</title><h2>抱歉,无法为您获取课件</h2><hr><b>你可以联系该课件的分享者,以取得解决方案。</b>")}}
    function GetCourseware(cid,ver){var xhttp=null;if(window.XMLHttpRequest){xhttp=new XMLHttpRequest()}else if(window.ActiveXObject){xhttp=new ActiveXObject('Microsoft.XMLHTTP')}xhttp.onreadystatechange=function(){if(this.readyState==4&&this.status==200){ShowCourseware(this.responseText)}};xhttp.open("GET","./enow/thumbnail/api/v1/courseware?coursewareId="+cid+"&version="+ver+"&resolution=960_640",true);xhttp.send()}function GetList(){var uid=window.location.href.split("?")[1].split("&")[0].split("=")[1];var ServerTime=new Date().getTime();var xhttp=null;if(window.XMLHttpRequest){xhttp=new XMLHttpRequest()}else if(window.ActiveXObject){xhttp=new ActiveXObject('Microsoft.XMLHTTP')}xhttp.onreadystatechange=function(){if(this.readyState==4&&this.status==200){var jstr=eval("("+this.responseText+")");if(jstr["error_code"]==0){var OPStr="";for(var i=0;i<=10;i++){try{OPStr+=(i+1)+". "+jstr.data[i].name+"\n"}catch{}}let k=prompt("请选择需要打开的课件(填数字编号)\n"+OPStr,"1");GetCourseware(jstr.data[k-1].cid,jstr.data[k-1].version)}else{alert("课程未开始或课程已结束!")}}};xhttp.open("POST","./apis.json?actionName=GET_COURSE_ACCESS_CODE_LIST&t="+ServerTime,true);xhttp.setRequestHeader('Content-Type','application/json');xhttp.send('{"courseUid":"'+uid+'"}')}
    GetList();
}, 'O');

let menu2 = GM_registerMenuCommand('讨论区刷屏', function() {
    function Send(con,rid){var uid=window.location.href.split("?")[1].split("&")[0].split("=")[1];var ServerTime=new Date().getTime();var xhttp=null;if(window.XMLHttpRequest){xhttp=new XMLHttpRequest()}else if(window.ActiveXObject){xhttp=new ActiveXObject('Microsoft.XMLHTTP')}xhttp.onreadystatechange=function(){if(this.readyState==4&&this.status==200){var jstr=eval("("+this.responseText+")");if(jstr.error_code==0){}else{}}};xhttp.open("POST","./apis.json?actionName=CHAT_SEND_QUESTION&t="+ServerTime,true);xhttp.setRequestHeader('Content-Type','application/json');xhttp.send('{"roomId":"'+rid+'","courseUid":"'+uid+'","text":"'+con+'"}')}
    function GetRoomId(){var uid=window.location.href.split("?")[1].split("&")[0].split("=")[1];var ServerTime=new Date().getTime();var xhttp=null;if(window.XMLHttpRequest){xhttp=new XMLHttpRequest()}else if(window.ActiveXObject){xhttp=new ActiveXObject('Microsoft.XMLHTTP')}xhttp.onreadystatechange=function(){if(this.readyState==4&&this.status==200){var jstr=eval("("+this.responseText+")");let rid=jstr.data.roomId;var SqStr=prompt("请输入想要发送的内容:","");if(SqStr==null){return}var SqTimeSet=prompt("请输入想要发送的次数:","1");for(let i=1;i<=SqTimeSet;i++){Send(SqStr,rid)}}};xhttp.open("POST","./apis.json?actionName=GET_TARGET_COURSE&t="+ServerTime,true);xhttp.setRequestHeader('Content-Type','application/json');xhttp.send('{"courseUid":"'+uid+'"}');}
    GetRoomId();
}, 'G');
/* 以上为菜单设定 */

(function() {
    'use strict';

})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址