云班课🆕答题小能手🥇
// ==UserScript==
// @run-at document-body
// @name 云班课🆕答题小能手🥇
// @namespace http://tampermonkey.net/
// @version 3.3
// @description 【😎蓝墨云全自动答题,一键完成所有资源学习😎】、【🧡永久免费使用🧡】、【💙由MeTo团队开发,耗时一鲲年自研发题库,已申请诸多专利💙】,【🔥抵制网络答题考核制度⚡️,🌵学生的平时成绩不应由简单的题目判定🌵,更不是依靠搜索引擎🔥】,【欢迎加入qq群:😄286997695😄,共同交流进步】。【💚作者在此保证,脚本无任何诸如(手机号,学校信息,等隐私信息收集)💚】
// @author 阿绿
// @note 致谢表:@M_、@吃土豆长大的马铃薯、@悟虚、@台灯没电了、@Pumpkin、@小陈陈陈陈啊、@Sli、@无心人、@29827*0049、@热心解答(以上均是对此脚本做出过有效BUG提交OR提供账户帮助修复OR提供好的idea,如有遗漏请告知)
// @supportURL https://gitee.com/xiaolv12/yunbanke
// @homepageURL https://gitee.com/xiaolv12/yunbanke
// @contributionURL https://afdian.net/a/tiku_01
// @match https://www.mosoteach.cn/web/index.php?*
// @icon https://bkimg.cdn.bcebos.com/pic/4ec2d5628535e5dde7114110e88eb0efce1b9c16c4e1
// @require https://cdn.bootcss.com/crypto-js/3.1.9-1/crypto-js.min.js
// @require https://greasyfork.org/scripts/463249-%E4%BA%91%E7%8F%AD%E7%8F%AD%E4%BE%9D%E8%B5%96/code/%E4%BA%91%E7%8F%AD%E7%8F%AD%E4%BE%9D%E8%B5%96.js?version=1202671
// @grant GM_setValue
// @grant GM_getValue
// @grant GM_addStyle
// @grant GM_info
// @grant GM_xmlhttpRequest
// @grant GM_registerMenuCommand
// @connect 121.37.103.75
// @connect gitee.com
// @connect *
// @license MIT
// ==/UserScript==
;(function(_this) {
const styleTag = `<style>
.zhezhao{
position: fixed;
left: 50%;
top: 50%;
transform:translate(-50%,-50%);
/*background: #000;*/
opacity: 0.7;
}
.tankuang{
position: relative;
background: #000;
border-radius: 5px;
padding: 10px;
}
#header{
display: flex;
}
#header-right{
position: absolute;
border-radius: 5px;
background: red;
color: #fff;
text-align: center;
}
</style>`;
$(styleTag).appendTo('head');
let $html_text = $(`
<center>
<div class="zhezhao" id='zhezhao'>
<div class="tankuang">
<div id="header">
<span style="color:#ffffff; font-size:20px;margin: auto;line-height: 40px;" id="layer_msg">复制成功</span>
</div>
</div>
</div>
</center>
`);
$('body').append($html_text);
document.getElementById('zhezhao').style.display="none";
function dianwo(str){
document.getElementById('layer_msg').innerHTML = str;
document.getElementById('zhezhao').style.display="";
setTimeout(function(){
document.getElementById('zhezhao').style.display="none";
},3000);
}
if(GM_getValue("window.al_yun_xx")){
// window.al_yun_xx = GM_getValue("window.al_yun_xx");
}else{
GM_xmlhttpRequest({
method: "GET",
url: "https://gitee.com/xiaolv12/yunbanke/raw/master/%E7%AD%94%E9%A2%98%E5%8A%A9%E6%89%8B.js",
onload: res=> {
dianwo("脚本正在加载中,请稍等<br>无法加载请加QQ群<br>移动头像可改变位置");
// window.al_yun_xx = res.response;
GM_setValue("window.al_yun_xx",res.response);
},
onerror:err=>{
dianwo("加载失败");
}
})
}
function MyPage(menu){
// time = Math.floor(Date.now()/10000);
// time = time %16;
// console.log(time)
// // this.axios = _this.axios;
// // this.Qs =Qs;
this.version="3.3";
this.$ = $;
this.json = _this.JSON;
this.namespace = menu.id;
this.menu = menu;
this.config = {};
this.config.tk_uid =null;
this.initMenu();
// this.initVue();
return this;
}
MyPage.prototype.urlToObject = function(url){
let obj = {};
let arr1 = url.split("?");
let arr2 = arr1[1].split("&");
for(let i=0;i<arr2.length;i++){
let res = arr2[i].split("=");
obj[res[0]]=res[1];
}
return obj;
}
MyPage.prototype.HtmlUtil = {
/*1.用浏览器内部转换器实现html转码*/
htmlEncode:function (html){
//1.首先动态创建一个容器标签元素,如DIV
var temp = document.createElement ("div");
//2.然后将要转换的字符串设置为这个元素的innerText(ie支持)或者textContent(火狐,google支持)
(temp.textContent != undefined ) ? (temp.textContent = html) : (temp.innerText = html);
//3.最后返回这个元素的innerHTML,即得到经过HTML编码转换的字符串了
var output = temp.innerHTML;
temp = null;
return output;
},
/*2.用浏览器内部转换器实现html解码*/
htmlDecode:function (text){
//1.首先动态创建一个容器标签元素,如DIV
var temp = document.createElement("div");
//2.然后将要转换的字符串设置为这个元素的innerHTML(ie,火狐,google都支持)
temp.innerHTML = text;
//3.最后返回这个元素的innerText(ie支持)或者textContent(火狐,google支持),即得到经过HTML解码的字符串了。
var output = temp.innerText || temp.textContent;
temp = null;
return output;
}
};
MyPage.prototype.resoluAnswers=function(data){
let newData = {};
if(data ==null){
return console.log("并未获取到题库数据");
}
if("activity" in data){
console.log("蓝墨云题库重组中");
newData.id = data.activity.id;
newData.title = data.activity.title;
newData.rows = [];
data.activity.topics.forEach(row=>{
let _data = {};
_data.id = row.topic_id;
let imgs =null;
try{
imgs = $.parseHTML(row.subject); // 去除特殊字符报错
}catch (e){
console.log(e);
}
row.subject=this.HtmlUtil.htmlDecode(row.subject);
if(imgs){
imgs.forEach(async function(img,index){
if(img.localName == "img"){
row.subject += img.outerHTML;
}
})
}
row.subject = row.subject.substr(0,500)
_data.subject = row.subject;
_data.options = [];
_data.answers = [];
_data.type = row.type;
if(row.type == "TF"){
if(row.tf_answer!=null){
_data.answers.push(row.tf_answer);
}else{
if(row.result == 1){
_data.answers.push(row.user_tf_answer)
}else{
_data=null;
}
}
}else if(row.type == "FILL"){
row.fill.blank_alternatives.forEach(answer=>{
if(answer.contents[0] !=null){
_data.answers.push(answer.contents);
}else{
if(answer.result ==1){
_data.answers.push(answer.user_content)
}else{
_data=null;
}
}
});
}else{
if(row.answers.length != 0){
row.options.forEach(option=>{
_data.options.push(this.HtmlUtil.htmlDecode(option.content));
row.answers.forEach(index =>{
if(option.item_no == index){
_data.answers.push(this.HtmlUtil.htmlDecode(option.content));
}
});
});
}else{
if(row.result == 1){
row.options.forEach(option=>{
_data.options.push(this.HtmlUtil.htmlDecode(option.content));
row.user_answers.forEach(index =>{
if(option.item_no == index){
_data.answers.push(this.HtmlUtil.htmlDecode(option.content));
}
});
});
}else{
_data=null;
}
}
}
if(_data != null){
newData.rows.push(_data);
}
});
}else if("paperId" in data){
console.log(data)
console.log("meto题库重组中");
newData.id = data.title;
newData.rows = [];
data.problems.forEach(row=>{
let _data ={};
_data.problemId = row.problemId;
_data.subject = row.text;
_data.answers = JSON.parse(row.answer);
newData.rows.push(_data);
});
}else if("rule" in data){
console.log("助手题库重组中");
newData.rows = [];
if("get_answer" in data){ //修改未测试
data.get_answer.forEach(row=>{
let _data ={};
_data.answers = [];
let br = new RegExp("-and-","g");
row.t = row.t.replace(br,"&");
row.t=this.HtmlUtil.htmlDecode(row.t);
_data.subject = row.t;
row.a.forEach(an=>{
_data.answers.push(this.HtmlUtil.htmlDecode(an.replace(br,"&")))
})
_data.type =row.y;
_data.options = row.s;
newData.rows.push(_data);
});
}
}else if("flag" in data){
if (data.flag == "metoproblems"){
console.log("meto1题组重组中");
newData.id = data.title;
newData.rows = [];
try{
data.problems.forEach(row=>{
let _data ={};
_data.problemId = row.problemId;
_data.subject = row.text;
_data.answers = JSON.parse(row.answer);
newData.rows.push(_data);
});
}catch (e){
// alert("服务器连接失败,请联系作者。")
console.log("发生异常:" + e);
}
}
}else{
console.log(data);
}
console.log(newData)
return newData;
}
/*
* 云班课请求
*/
MyPage.prototype.getListMember = function(clazzcourseId){
return new Promise((resolve,rejcet)=>{
this.$.ajax({
type: 'post',
url:"https://www.mosoteach.cn/web/index.php?c=member&m=get_list_member",
dataType:"json",
data: {
clazz_course_id: clazzcourseId,
order_item: 'score'
},
success: function(res) {
resolve(res.data.member_data);
}
});
});
}
MyPage.prototype.personResult = function(id,userId,ccId){
return new Promise((resolve,rejcet)=>{
this.$.ajax({
type: 'post',
url:"https://www.mosoteach.cn/web/index.php?c=interaction_quiz&m=person_result",
dataType:"json",
data: {
id: id,
user_id: userId,
cc_id: ccId,
},
success: function(res) {
resolve(res);
}
});
});
}
MyPage.prototype.join_class=function(){
return new Promise((resolve,rejcet)=>{
this.$.ajax({
type: 'post',
url:"https://www.mosoteach.cn/web/index.php?c=clazzcourse&m=my_joined",
dataType:"json",
success: function(res) {
resolve(res.data);
}
});
});
}
MyPage.prototype.get_page=function(class_id){
return new Promise((resolve,rejcet)=>{
this.$.ajax({
type: 'post',
url:"https://www.mosoteach.cn/web/index.php?c=interaction&m=index&clazz_course_id="+class_id,
success: function(res) {
resolve(res);
}
});
});
}
MyPage.prototype.get_page_status=function(id,ccId){
return new Promise((resolve,rejcet)=>{
this.$.ajax({
type: 'post',
url:"https://www.mosoteach.cn/web/index.php?c=interaction_quiz&m=get_quiz_ranking",
dataType:"json",
data: {
id: id,
ccId: ccId,
},
success: function(res) {
resolve(res);
}
});
});
}
MyPage.prototype.x_res = function(reslist){
var watch = reslist[0]
var req = {}
if (reslist.length != 0) {
$("#x_res").text("剩下" + reslist.length + "个")
} else {
$("#x_res").text("全部完成")
location.reload()
return 0
}
var clazz_course_id = this.config.clazz_course_id
$.ajax({
type: "POST",
url: "https://www.mosoteach.cn/web/index.php?c=res&m=request_url_for_json",
data: {
'file_id': watch.id,
'type': 'VIEW',
'clazz_course_id': clazz_course_id,
},
dataType: "json",
success: msg => {
const src = msg.src
if (src.indexOf("m3u8") > -1) {
fetch(src)
.then(data => data.text())
.then(text => {
let time = 0
for (i of text.split("\n")) {
if (i.indexOf("#EXTINF:") > -1) {
i = parseFloat(i.replace("#EXTINF:", ""))
time += i
}
}
time = Math.ceil(time)
$.ajax({
type: 'post',
dataType: 'json',
url: 'https://www.mosoteach.cn/web/index.php?c=res&m=save_watch_to',
data: {
clazz_course_id: clazz_course_id,
res_id: watch.id,
watch_to: time,
duration: time,
current_watch_to: time
},
success: res => {
reslist.splice(0, 1)
this.x_res(reslist)
}
});
})
} else {
reslist.splice(0, 1)
this.x_res(reslist)
}
}
})
}
MyPage.prototype.getAnswers = async function(id,deep){
let answers = {};
let obj={
"poolId": this.config.poolId,
"userId": this.config.tk_uid,
"querry": {
"operator": "==",
"argument1": "papertitle",
"argument2": id,
},
"deep": deep,
};
await(this.upladApi("http://121.37.103.75:10086/tiku/api/v1/queryCollection",obj).then(async (resutData)=>{
if(resutData.result==="success" && !!resutData.json){
var data = resutData.json.results;
console.log("总共查询到数据库数量"+data.length+"个");
data.forEach((item, index) =>{
if(index == 0){
answers =this.resoluAnswers(item);
}else{
this.resoluAnswers(item).rows.forEach(i =>{
answers.rows.push(i);
})
}
});
}
}));
return answers;
}
MyPage.prototype.getCookie = function(objName) { //获取指定名称的cookie的值
var arrStr = document.cookie.split("; ");
for (var i = 0; i < arrStr.length; i++) {
var temp = arrStr[i].split("=");
if (temp[0] == objName) return temp[1]; //解码
}
return "";
}
MyPage.prototype.arrowMove = function(e){
// var e = document.getElementById(e);
// 元素大小
let elW = e.currentTarget.offsetWidth
let elH = e.currentTarget.offsetHeight
// 元素位置
let elL = e.currentTarget.parentNode.parentNode.offsetLeft
let elT = e.currentTarget.parentNode.parentNode.offsetTop
// 鼠标位置
let x = e.clientX
let y = e.clientY
// 窗口大小
let w = window.innerWidth
let h = window.innerHeight
// 鼠标到元素左边距离
let moveX = x - elL
let moveY = y - elT
let el = e.currentTarget
document.onmousemove = function (e) {
// el.style.position = 'fixed';
el.parentNode.parentNode.style.left = e.clientX -moveX + 'px'
el.parentNode.parentNode.style.top =e.clientY - moveY + 'px'
}
document.onmouseup = function (e) {
document.onmousemove = null
document.onmouseup = null
}
};
MyPage.prototype.initMenu = function(){
let $ = this.$,menu = this.menu;
$(document).on('mousedown', '#x_set', function (e) {
window.my.arrowMove(e);//.target.parentNode.id
});
$(document).on('click', '#x_start', function () {
window.my.start();
});
$(document).on('click', '#x_set', function () {
$('body').find("#set").toggle('active');
$('body').find("#aner").hide("slow");
});
// $(document).on('click', '#x_charge', function () {
// let aner = $('body').find("#aner")
// aner.css("display","block")
// aner.text("");
// aner.append("充电地址:");
// });
$(document).on('click', '#x_find',async function () {
let aner = $('body').find("#aner")
let text = document.getElementById("find_input")
aner.show("slow");
aner.text("");
if(text.value.length <6){
aner.append("搜索题目需要6个字符以上");
return;
}
aner.append("若长时间未返回信息,请反馈<hr>");
// problem = window.my.HtmlUtil.htmlDecode(text.value);
// console.log(problem)
await window.my.findproblem(text.value.replace(/ /g," "))
aner.text("");
aner.append("搜索到"+window.my.config.answer.rows.length+"条相关题目<hr>");
window.my.config.answer.rows.forEach(row=>{
aner.append("题目:"+row.subject+"<br>"+"答案:");
row.answers.forEach(answer =>{
aner.append(answer+" ");
});
aner.append("<hr>");
});
});
$(document).on('click', '#x_yue', async function () {
let aner = $('body').find("#aner")
aner.show("slow");
$("#x_yue").attr("disabled", true)
aner.text("正在搜索答案中");
let answers = await(window.my.getAnswers(window.my.config.id,true));
if(!answers||JSON.stringify(answers) == "{}"){
aner.text("暂时没有此试卷信息。可直接开始答题进行搜索(可能最终答案没那么全)");
return;
}
aner.text("搜索到"+ answers.rows.length +"条题目信息");
answers.rows.forEach(row=>{
aner.append("<hr>");
aner.append("题目:"+row.subject+"<br>"+"答案:");
row.answers.forEach(answer =>{
aner.append(answer+" ");
});
});
});
$(document).on('click', '#x_res', async function () {
$("#x_res").attr("disabled", true)
var reslist = []
$(".res-row-open-enable").each(function() {
if ($(this).find('span[data-is-drag]')[0].dataset.isDrag == "N") {
reslist.push({
id: $(this).attr('data-value'),
state: $(this).find('span[data-is-drag]')[0].dataset.isDrag,
type: $(this).attr('data-mime')
})
}
});
window.my.x_res(reslist)
});
/**
* MosoteachHelper CSS
*/
const styleTag = `
<style>
#${menu.id} #zhu button[disabled]{
color: white !important;
background-color: rgb(188, 188, 188) !important;
}
#${menu.id} #zhu button{
float:left;
margin:25px 2px;
// width:70px;
// height:25px;
/* 把按钮撑大 */
padding: 4px 8px;
/* 去除默认边框 */
border: none;
/* 圆角 */
border-radius: 50px;
/* 按钮背景色 */
background-color: #8888ff;
/* 字体颜色、大小、粗细、字间距 */
color: #fff;
font-size: 12px;
font-weight: bold;
letter-spacing: 1px;
/* 鼠标小手 */
cursor: pointer;
/* 给个定位 */
position: relative;
/* 3D模式 */
transform-style: preserve-3d;
/* 过度动画时间 */
transition: ease-in-out 2s;
}
#${menu.id} #zhu button:hover {
/* 鼠标放上来旋转一圈 */
transform: rotateX(360deg);
}
#${menu.id} #zhu button::before,
#${menu.id} #zhu button:after {
content: "";
/* 白色边框线 */
border: 0.8px solid #fff;
/* 圆角 */
border-radius: 50px;
/* 通过定位来撑开边框,简单来说,确定4边的距离,中间自然就固定了 */
position: absolute;
top: 1px;
left: 1px;
right: 1px;
bottom: 1px;
/* 3D模式 */
transform-style: preserve-3d;
/* 设置透视参数,向 Z轴方向移动,正常时候就是向屏幕外面移动 */
transform: perspective(1000px) translateZ(5px);
}
#${menu.id} #zhu button::after {
/* 另一边反着移动一下 */
transform: perspective(1000px) translateZ(-5px);
}
#${menu.id} #zhu button span {
/* 设置 span 为块元素 */
display: block;
/* 3D模式 */
transform-style: preserve-3d;
/* 同样设置透视,抬高 Z轴距离 */
transform: perspective(500px) translateZ(8px);
}
#${menu.id}{
z-index: 199;
text-align:center;
// width:0;
// height:0;
position:fixed;
pointer-events: none;
left:${menu.pos.x}px;
top:${menu.pos.y}px;
// background:${menu.background};
// opacity:${menu.opacity};
}
#${menu.id} #zhu{
pointer-events: visible;
}
#${menu.id} .drawer{
pointer-events: visible;
position:relative;
max-height:200px;
overflow:auto;
text-align:left;
display: none;
background: #fff;
border-radius: 10px;
box-shadow: 0 5px 15px rgba(0,0,0,0.2);
width: 240px; /* initially */
opacity: 0.9;
z-index: 199;
padding:3px;
margin:10px;
}
#${menu.id} .drawer p{
text-align:left;
padding-left:5px;
}
#${menu.id} #x_set{
animation: change 3s linear 0s infinite;
float:left;
position:relative;
z-index: 200;
margin:10px;
border-radius:50%;
overflow:hidden;
height: 50px;
width:50px;
border: solid 2px #00ff00;
background: url(${GM_getValue("userimg") ? GM_getValue("userimg"):"https://i.jpg.dog/8a4f4bd4c5ea7b1eff20a2978885f2b1.jpeg"});
background-size: 50px 50px;
}
@keyframes change {
0% {border: solid 2px #333;}
25% {border: solid 2px #f60;}
50% {border: solid 2px #f00;}
75% {border: solid 2px #1ab558;}
100% {border: solid 2px #333;}
}
</style>`;
$(styleTag).appendTo('head');
let $menu = $(
`<div id='${menu.id}'>
<div id ="zhu">
<div id="x_set"></div>
</div>
<div class= "drawer" id="set">
<p>
用户<input id = "tiku_user" readonly="readonly" value="未获取到用户名,请刷新重试" /> <button id="x_charge" ><a target="_blank" href = "https://afdian.net/a/tiku_01">充电</a></button>
</p>
<p>
题目<input id = "find_input" placeholder="搜索题目需要6个字符以上" /> <button id="x_find" >搜索</button>
</p>
<p>
如遇到答案未显示,未加载,未标红,等等问题,请加qq群:286997695反馈
</p>
</div>
<div class= "drawer" id="aner">
<p>
正在获取试卷中,请稍等
</p>
</div>
</div>`);
$('body').append($menu);
}
MyPage.prototype.initData = async function(){ //初始化
GM_registerMenuCommand("基本设置",function(){
$('body').find("#set").toggle('active');
});
GM_registerMenuCommand(GM_getValue("is_wait") ? "开启延迟交卷" : "关闭延迟交卷(不建议)" ,function(){
GM_setValue("is_wait",!GM_getValue("is_wait"));
location.reload();
});
GM_registerMenuCommand("重置脚本",function(){
GM_setValue("overdue",1);
GM_setValue("window.al_yun_xx",null);
location.reload();
});
this.config = this.urlToObject(window.location.href);
this.config.tk_uid=GM_getValue("ti_uid");
this.config.pp = GM_getValue("pp");
this.config.poolId = GM_getValue("poolId");
if(GM_getValue("overdue")
||!this.config.tk_uid || !this.config.pp || !this.config.poolId
|| this.config.tk_uid == "null" || this.config.pp == "null" || this.config.poolId == "null")
{
GM_setValue("overdue",null)
let classListData = await (this.join_class());
classListData.forEach(ccid=>{
GM_setValue(ccid.id,ccid.course.name);//对应课名
// console.log(ccid);
})
if(classListData.length == 0){
return console.log("未登录账户");
}
let {data:objectList} = await (this.getListMember(classListData[0].id));
if(objectList.length <= 0 ){
return alert("初始化脚本失败");
}
GM_setValue("userimg",objectList[0].full_avatar_url);
let img_table = $('body').find("#x_set")
img_table.css("background","url(" + objectList[0].full_avatar_url + ")")
this.config.user_id = objectList[0].user_id;
this.config.user_list = objectList;
// console.log(this.config.user_list)
this.config.full_name = objectList[0].full_name;
this.config.clazz_course_id = classListData[0].id
let obj={
"unionid": objectList[0].user_id,
"username": objectList[0].full_name,
"poolId":"ec942b0b-38c6-3256-b0e1-2a33428d4bbc",
"grade": "云班课",
};
await(this.upladApi("http://121.37.103.75:10086/tiku/api/v1/userInfo",obj).then(async (resutData)=>{
if(resutData.result==="success" && !!resutData.json){
var data = resutData.json.data;
if(data != null){
if("message" in data){
data.message = data.message.slice(1,-1).split(", ");
this.config.tk_uid = data.message[0]
this.config.pp = data.message[1]
//若第一次获取pp为null则是新建用户
if (this.config.pp == "null"){
await this.upladApi("http://121.37.103.75:10086/tiku/api/v1/userInfo",obj).then((resutData)=>{
if(resutData.result==="success" && !!resutData.json){
data = resutData.json.data;
data.message = data.message.slice(1,-1).split(", ");
this.config.pp = data.message[1]
this.config.poolId = CryptoJS.MD5(CryptoJS.MD5(this.config.user_id).toString() + this.config.pp).toString();
this.config.poolId = this.config.poolId.slice(0,8)+"-"+this.config.poolId.slice(8,12)+"-"+this.config.poolId.slice(12,16)+"-"+this.config.poolId.slice(16,20)+"-"+this.config.poolId.slice(20,32)
GM_setValue("poolId",this.config.poolId);
GM_setValue("ti_uid",this.config.tk_uid);
GM_setValue("pp",this.config.pp);
//题库获取模块 start
this.config.class_size = 0
this.config.class_length = 0
let aner = $('body').find("#aner")
aner.text("欢迎您的第一次使用,正在为您聚合数据中,请稍后。。。。");
aner.css("display","block")
for(let i=0;i<classListData.length;i++){
let cl = classListData[i];
this.get_page(cl.id).then((result) =>{
$(result).find(".interaction-row.interaction-row-open-enable").each(async function(index,div){
let id = $(div).attr('data-id');
let type = $(div).attr('data-type');
let status = $(div).attr('data-row-status');
if(type=="QUIZ"){
if(!GM_getValue(id)){
window.my.config.class_length++;
window.my.config.class_size++;
await(window.my.get_quiz_result(id,window.my.config.user_id,cl.id));
window.my.config.class_size--;
aner.text("百分比长时间未动请刷新页面\n已加载:"+Math.trunc((1-(window.my.config.class_size/window.my.config.class_length))*100)+"%");
}
}
})
});
}
//题库获取模块 end
}
})
}else{
//生成poolid
this.config.poolId = CryptoJS.MD5(CryptoJS.MD5(this.config.user_id).toString() + this.config.pp).toString();
this.config.poolId = this.config.poolId.slice(0,8)+"-"+this.config.poolId.slice(8,12)+"-"+this.config.poolId.slice(12,16)+"-"+this.config.poolId.slice(16,20)+"-"+this.config.poolId.slice(20,32)
GM_setValue("poolId",this.config.poolId);
GM_setValue("ti_uid",this.config.tk_uid);
GM_setValue("pp",this.config.pp);
// document.cookie = "ti_uid="+this.config.tk_uid+";max-age="+60 * 60 * 3;
}
}
}
}
}));
}
document.getElementById("tiku_user").value=this.config.tk_uid;
if(this.config.m === "reply"){ //
// this.Listener();
$('#zhu').append("<button id='x_start' ><span>开始搜题</span></button>");
// document.getElementById("zhu")
}else if(this.config.c === "res"){
$('#zhu').append("<button id='x_res' ><span>一键完成资源</span></button>");
}else if(this.config.m === "quiz_ranking" || this.config.m === "start_quiz_confirm"){
$('#zhu').append("<button id='x_yue' ><span>提前阅卷</span></button>");
}else if(this.config.m === "person_quiz_result"){
// $('#zhu').append("<button id='x_start' ><span>开始搜题</span></button>");
let aner = $('body').find("#aner")
aner.css("display","block")
aner.text("正在导入题库中");
if(!GM_getValue(this.config.id)){
flag = await(this.get_quiz_result(this.config.id,this.config.user_id,this.config.clazz_course_id));
if(flag == "success"){
aner.text("题库导入成功");
}else{
aner.text("题库导入失败");
}
}else{
aner.text("题库已存在");
}
}else{
$('#zhu').append("<button onclick='window.open(\"https://afdian.net/a/tiku_01\");'><span>MeT0题库</span></button>");
}
}
MyPage.prototype.get_quiz_result=async function(id,user_id,clazz_course_id){
var classname = GM_getValue(clazz_course_id)
if(!classname){
classname = "未命名课程";
}
let res = await (this.personResult(id,user_id,clazz_course_id));
var status = "error";
// if(res.result_code != 0){
// return alert(res.result_msg);
// }
answers = this.resoluAnswers(res);
if(answers == null || JSON.stringify(answers) == '{}' ){
_this.dumpData = this.config;
return status;
}
let obj={
"poolId": this.config.poolId,
"userId": this.config.tk_uid,
"tags":[classname,answers.title,"云班课"],
"title":answers.id,
"problems":[],
};
let data={};
answers.rows.forEach(row=>{
if(row.subject.length < 4 || row.answers == ""){
console.log("题目录入有误");
return; //跳出循环
}
data={
"tags": ["云班课"],
"text": row.subject,
"answer": JSON.stringify(row.answers),
};
data.tags.push(row.type);
let l = ["choice_A","choice_B","choice_C","choice_D","choice_E","choice_F","choice_G","choice_H","choice_I","choice_J","choice_K","choice_L","choice_M","choice_N","choice_O","choice_P","choice_Q","choice_R","choice_S","choice_T","choice_U","choice_V","choice_W","choice_X","choice_Y","choice_Z"];
let i=0;
row.options.forEach(option =>{
data[l[i]]=option;
i=i+1;
})
obj.problems.push(data);
});
if(obj.problems.length == 0){
return;
}
await(this.upladApi("http://121.37.103.75:10086/tiku/api/v1/problems",obj).then((resutData)=>{
console.log(resutData)
if(resutData.result=="success" && resutData.json){
var data = resutData.json.data;
console.log(data);
GM_setValue(id,1);
status = "success"
}else{
console.log(resutData);
}
}));
return status;
}
var _0x2ea4=['svvvtw4','v2H5vu4','whHgB0m','6yEn5Asn6k+v5y23','s21MCeC','6k+35Rgc6lAf5PE2','u3vbwwS','5yQH5zMO44cc','tuTNyKi','5A+85ywL6zsz6k+V77Ym6k+36igu57o7566H55cg','wLnbzKm','y2HHCKf0','yxbWBhK','ntmXotDpAhzfyKO','EvPqrK8','wNDsAe4','wMr0sNG','qKfhyuG','shnvs20','Ds9HCgKVDJeVCa','ndy1nhzbDK9uuG','BwHluMi','sfzvyvG','s0nWDfO','BM93','DNjeq2y','A0PPB00','tgzAuwC','w14GxsSPkYKRwW','5zco6yEn6k+v77Ym5OIw6icf55U05O6L5yQG576K','77Ym5P2L5ykS5PU077Ym5OIw6icf5P2L57Uz6Ag5','tMXzyKK','z1bHCxe','vNbju3O','ywnJzxb0','zgf0yq','yKfyt2O','mJaW','rgj5rKu','CMf1Ahi','sgnnALi','uMvNrxHW','qMnbELe','mJu1mvHJrfjMzG','sw9qv0K','ndyYmJuXt01tvLjX','ChjVDg90ExbL','uK9Lt1a','EhHhruy','tMD6BMO','v2fovgy','A2fKBwi','A05RCue','CgfYC2u','ELD0z08','q29UDgvUDc1uEq','DefcEuy','yLj2sgS','sg9fr00','tvv1z0C','ndaX','DgLTzv9LCNjVCG','DxbSywrbCgK','C3bSAxq','n1DfqMHXwG','zhj2EuW','AhLIuwe','zhPLz24','zhL3rLG','v2DVywi','77Ym5yQP5yQB5l2C6icf5PU05PEP5PU05O2I5PYn','zvfZvLC','ANnVBG','ntaX','v2L2t0q','EwLkrfe','ndaW','DwziENK','zxjYB3i','shDkAgq','EeXAvhK','x3jHDgu','uwPMAuC','Efn0CMLUzW','Dg9tDhjPBMC','vKHesxm','yLjZtKe','mdeYmZq1nJC4oq','s3vkAem','tLn4D1m','mtaZnJC5uujUrNvL','Ahr0CdOVlZeYmq','vMXQBxq','B01UsxC','DwHQtKi','5z+656ga6ywn572U5PAh5lU25lY85lMo5yE66zsz','vePrvMy','thrMC20','ALj0B1C','yM9KEq','mJaXmJyWt09hEwPm','yMXVy2S','xIbDFq','sMLgAgm','yuX0rhy','ywjJzgvM','DuTJB1e','yxHPCwm','BMjvvuW','sxbuzhq','wgHOEvG','EufuC3C','vNfUtw4','y0DPwgq','s2DJsKK','s29ZtLK','vwLyzeO','yLzvAeK','CufbwMy','y3nZ','5PYn5yQH5zMO5zon5BQu6lAf5PE277Ym6k+356In','Bg9N','mxWYFdq','BKvuEvq','vufPvve','z05TBgS','uhnHAfm','tLLcvgu','lJm3lJeWmY43nq','z2vUzxjHDgvizq','A3P2DgC','mtKWm1rtswDXqW','Dgv4Da','zgLZCgXHEq','B3zLCMr1zq','sgnpCwW','C2XPy2u','DLnhsNq','D0H3sum','t1zZueG','vu1PqKK','wxf5v2G','BI9QC29U','5PEG5Rov6l+E5O6L5yIW5PYn5yQH5zMO','D2DSEeW','AKzlCMK','qMzuzK8','thDiv3K','DvDJrMq','z2Hbyuq','DgvZDa','i2fUzxi','zMLUza','Dw5KzwzPBMvK','B0Hvu0m','5lQgloIVT+wiT+AwSowqJUMhJEIVLq','u2nPwui','y0XsruG','sfniv08','BgvUz3rO','EwXdy0G','mNrZDwrTtq','nNW1FdD8m3WWFa','rxbtD0q','y1jHswG','xIHBxIbDkYGGkW','CMXNEfe','CMfUzg9T','CMvZDwX0','C3rHDhvZ','odfKsgLjDMu','svzjBey','CMvZCg9UC2vuzq','Bgv2Awy','qNjgDvi','BxP3Dhe','vhPns0m','qu1PDgG','nZL4t2nUEuy','uhvmAKq','Chnkyxi','teLJD3G','qM1ttKe','nJnICuPLyNy','55UU5ywf5lIQ55s177Ym5y+r5yQO6zkE6io95yQB','yMnLyvC','CuvdDMO','rhrfAMC','CKTUyu8','Ew53DMW','qxDXwwq','zhP2sgO','oJeWmdG2l3rPAW','zNvUy3rPB24','C3rYAw5NAwz5','C3vJy2vZCW','rKP2AKO','zwXLDvi','Dg9Rzw4','ntaW','y29UzMLN','B2jQzwn0','C3vIC3rY','DMnIDeW','ENzerMi','CM9IBgvTCW','sgL5Axy','wfjRt2O','ugvWuLy','uxzjCKG','u2P4sKG','zfDKEwS','yxbWBgLJyxrPBW','Cg9ZDa','BwvZC2fNzq','DMjxDMS','Cg9VBeLK','zfDxyNO','zMXVB3i'];(function(_0x29bd3c,_0x15d3d6){function _0x1162f0(_0xc4edda,_0x458708,_0x331c70,_0x402f44){return _0x398c(_0x458708-0x1ac,_0xc4edda);}function _0x785279(_0x3b0a2a,_0x4ad99c,_0x5ad5f6,_0x5e36ba){return _0x398c(_0x3b0a2a-0xf4,_0x5e36ba);}while(!![]){try{var _0x4eec9c=parseInt(_0x1162f0(0x206,0x24f,0x21e,0x22d))*parseInt(_0x1162f0(0x29f,0x2fb,0x30d,0x2d9))+-parseInt(_0x785279(0x1ed,0x1c1,0x187,0x1d6))+-parseInt(_0x785279(0x224,0x1ed,0x1b9,0x24e))+parseInt(_0x785279(0x1eb,0x252,0x1ff,0x1f8))*parseInt(_0x785279(0x18f,0x1d0,0x1ca,0x183))+parseInt(_0x1162f0(0x2da,0x285,0x24e,0x2bc))*parseInt(_0x785279(0x186,0x1b6,0x15d,0x130))+-parseInt(_0x1162f0(0x264,0x254,0x28a,0x22f))*parseInt(_0x1162f0(0x2ae,0x28c,0x262,0x2ec))+parseInt(_0x1162f0(0x333,0x2d2,0x293,0x2ec))*parseInt(_0x1162f0(0x315,0x2b8,0x252,0x303));if(_0x4eec9c===_0x15d3d6)break;else _0x29bd3c['push'](_0x29bd3c['shift']());}catch(_0x480d01){_0x29bd3c['push'](_0x29bd3c['shift']());}}}(_0x2ea4,0x1*0xcf26+-0x313a*0x11+0x60186));var _0x535c60=function(){var _0xe27459={};_0xe27459[_0x5024a8(0x260,0x2ec,0x29e,0x23c)]=_0x5024a8(0x323,0x32b,0x31d,0x354);function _0x5024a8(_0x4622e0,_0x5c2157,_0xbe1c4b,_0xe15d58){return _0x398c(_0xbe1c4b-0x1c8,_0x5c2157);}var _0x289553=_0xe27459,_0x14783c=!![];function _0x180d5a(_0x2e6ce9,_0x3e5cc0,_0x75b484,_0x106cd9){return _0x398c(_0x75b484- -0x30d,_0x3e5cc0);}return function(_0x36a170,_0x85bf24){function _0x40c5c1(_0x128f2e,_0xf1a8ba,_0x43edf4,_0x57f4d8){return _0x180d5a(_0x128f2e-0x1c1,_0x57f4d8,_0x43edf4-0x156,_0x57f4d8-0x91);}function _0x942011(_0x3b0198,_0x436ad2,_0x36c4d7,_0x30cdfd){return _0x5024a8(_0x3b0198-0xe8,_0x3b0198,_0x36c4d7- -0x528,_0x30cdfd-0x167);}var _0x7d4c50={};_0x7d4c50[_0x40c5c1(-0xc0,-0xc8,-0x119,-0x13e)]=_0x942011(-0x31b,-0x2fb,-0x2ca,-0x2e5)+_0x40c5c1(-0x80,-0xa5,-0xcf,-0x11a)+_0x40c5c1(-0x93,-0x3b,-0x85,-0x5f),_0x7d4c50[_0x942011(-0x254,-0x1ef,-0x22a,-0x278)]=_0x289553[_0x40c5c1(-0x116,-0x14f,-0xe1,-0x137)];var _0x59f443=_0x7d4c50,_0xacc2f1=_0x14783c?function(){function _0x3b78be(_0x25b288,_0x4a620e,_0x4e82e1,_0x21c6fe){return _0x40c5c1(_0x25b288-0x16b,_0x4a620e-0x54,_0x25b288- -0x49,_0x21c6fe);}function _0x2fe27f(_0x17842d,_0xa8713f,_0x512061,_0x4facb9){return _0x40c5c1(_0x17842d-0x104,_0xa8713f-0x1ce,_0x512061-0x2ee,_0xa8713f);}if(_0x59f443[_0x2fe27f(0x2a7,0x281,0x26d,0x257)]===_0x2fe27f(0x243,0x215,0x232,0x1ca)){var _0x4486d8=new _0x4404f0[(_0x2fe27f(0x1c8,0x1c8,0x22c,0x1fe))](_0x59f443[_0x3b78be(-0x162,-0x196,-0xfa,-0x1c0)]);return!_0x4486d8[_0x2fe27f(0x15d,0x1fe,0x1be,0x1d9)](_0x190f06);}else{if(_0x85bf24){var _0x5264ca=_0x85bf24[_0x3b78be(-0x128,-0x171,-0x104,-0x128)](_0x36a170,arguments);return _0x85bf24=null,_0x5264ca;}}}:function(){};return _0x14783c=![],_0xacc2f1;};}(),_0x36c459=_0x535c60(this,function(){var _0x1c8021={'Vljmt':function(_0x54235f,_0x250bbf){return _0x54235f(_0x250bbf);},'uhjNB':_0x12c87b(-0x1e8,-0x1e7,-0x1bd,-0x1b2),'BfTfO':_0x1fc138(0x42b,0x402,0x3fe,0x433),'SjxJH':function(_0x3a6a80,_0x4838f1,_0x2c82dc){return _0x3a6a80(_0x4838f1,_0x2c82dc);},'BmSNA':_0x1fc138(0x3b9,0x409,0x41f,0x3e1),'rauhr':function(_0x5a8ffe,_0x1f5059){return _0x5a8ffe===_0x1f5059;},'jFKri':_0x1fc138(0x3cb,0x362,0x363,0x3c3)+_0x12c87b(-0x145,-0x162,-0x15d,-0x165)+_0x12c87b(-0x126,-0x110,-0x113,-0x123),'IpTdt':_0x1fc138(0x39c,0x389,0x357,0x355),'gPaqq':_0x1fc138(0x33f,0x357,0x387,0x322),'WivOD':_0x1fc138(0x3c7,0x3d7,0x37f,0x3be),'NSxwS':function(_0xf57f5e,_0x16ebd8){return _0xf57f5e===_0x16ebd8;},'bAXOj':function(_0x412696){return _0x412696();}};function _0x1fc138(_0x144e2a,_0x28659b,_0x2943dd,_0x2f6923){return _0x398c(_0x2943dd-0x2cd,_0x28659b);}var _0x38adbf=typeof window!==_0x1c8021[_0x1fc138(0x3c6,0x3d8,0x406,0x39c)]?window:_0x1c8021[_0x12c87b(-0x109,-0x179,-0x152,-0x1b6)](typeof process,_0x1c8021[_0x1fc138(0x36e,0x3f5,0x3b9,0x3ea)])&&_0x1c8021[_0x12c87b(-0x187,-0x17a,-0x152,-0x144)](typeof require,_0x1c8021[_0x12c87b(-0xe0,-0xd0,-0x12f,-0x13a)])&&_0x1c8021[_0x1fc138(0x3c1,0x41c,0x3f2,0x40d)](typeof global,_0x1c8021[_0x1fc138(0x3ee,0x3bf,0x3b9,0x3b4)])?global:this;function _0x12c87b(_0x8b0ae6,_0x3ea4a1,_0x3a00a3,_0x551c4b){return _0x398c(_0x3a00a3- -0x245,_0x551c4b);}var _0x4befe2=function(){function _0x1834e8(_0x3a0dc8,_0x706a77,_0x16f453,_0x39f6aa){return _0x12c87b(_0x3a0dc8-0xfb,_0x706a77-0xb9,_0x706a77-0x3f5,_0x3a0dc8);}var _0x303402={'cGiXd':function(_0x3e0e61,_0x1a014b){function _0x14fdec(_0x2e19f0,_0x2c7373,_0x3b47a7,_0x54f280){return _0x398c(_0x2c7373-0x1de,_0x2e19f0);}return _0x1c8021[_0x14fdec(0x352,0x306,0x322,0x30c)](_0x3e0e61,_0x1a014b);},'kzvtg':_0x1c8021[_0x1834e8(0x329,0x2da,0x28a,0x270)],'nETyT':_0x1c8021[_0x1834e8(0x2e6,0x30e,0x2e2,0x313)],'XRkOj':function(_0x2a9b89,_0x258fac){function _0x30596a(_0x143682,_0x2a66e0,_0x3868ca,_0xa48cb6){return _0x1834e8(_0x2a66e0,_0x3868ca-0xe8,_0x3868ca-0x158,_0xa48cb6-0xbf);}return _0x1c8021[_0x30596a(0x3ab,0x371,0x3c0,0x3c4)](_0x2a9b89,_0x258fac);},'NlYbI':_0x1834e8(0x2ad,0x2ca,0x2b2,0x2b8),'Ltfsm':function(_0x4210df,_0x3eab5e,_0x220581){function _0x3c87d3(_0x5a8fb5,_0x1865e3,_0x7b260d,_0x516c09){return _0x1ff5c8(_0x1865e3-0x34,_0x1865e3-0xbe,_0x5a8fb5,_0x516c09-0x1b8);}return _0x1c8021[_0x3c87d3(0x2f1,0x2a5,0x2d8,0x2d5)](_0x4210df,_0x3eab5e,_0x220581);},'wglxL':_0x1c8021[_0x1ff5c8(0x255,0x240,0x214,0x250)]};function _0x1ff5c8(_0x1bd1f0,_0x3af610,_0x5316c6,_0x1ff8e1){return _0x1fc138(_0x1bd1f0-0xeb,_0x5316c6,_0x1bd1f0- -0x11f,_0x1ff8e1-0xab);}if(_0x1c8021[_0x1ff5c8(0x2a1,0x277,0x2ce,0x27c)](_0x1ff5c8(0x2bf,0x327,0x2fd,0x32b),_0x1834e8(0x29d,0x2e3,0x2f9,0x298))){let _0x6ca187=_0x303402[_0x1ff5c8(0x2eb,0x2c5,0x2ab,0x2c2)](_0x23e24c,_0x1ff5c8(0x2dd,0x323,0x2fd,0x2e6))[_0x1834e8(0x1d6,0x239,0x22e,0x288)](_0x303402[_0x1ff5c8(0x2fc,0x2c5,0x2ae,0x308)]);_0x6ca187[_0x1834e8(0x311,0x2f3,0x2ce,0x2af)](_0x1ff5c8(0x2ff,0x2b2,0x308,0x348),_0x303402[_0x1ff5c8(0x2f5,0x321,0x28c,0x2ce)]),_0x6ca187[_0x1ff5c8(0x2fe,0x36b,0x2c2,0x2b7)](_0x2b4cdf[_0x1834e8(0x257,0x277,0x2ba,0x234)]),_0x303402[_0x1834e8(0x212,0x270,0x28a,0x278)](_0x58934f,{'result':_0x303402[_0x1834e8(0x281,0x29b,0x255,0x2cc)],'json':_0x2fdf4b}),_0x303402[_0x1ff5c8(0x2db,0x336,0x291,0x347)](_0x3209a4,_0x303402[_0x1834e8(0x29e,0x30c,0x361,0x2af)],-0x88*-0x32+0x16d5+-0xc59*0x4);}else{var _0xb7a326=new _0x38adbf[(_0x1834e8(0x2b7,0x2a5,0x2ee,0x26f))](_0x1c8021[_0x1ff5c8(0x30b,0x378,0x33b,0x2d3)]);return!_0xb7a326[_0x1ff5c8(0x235,0x220,0x1f6,0x22b)](_0x36c459);}};return _0x1c8021[_0x12c87b(-0x172,-0xf7,-0x155,-0x12d)](_0x4befe2);});function _0x398c(_0x410f51,_0x1e3bd3){return _0x398c=function(_0x2491d9,_0x150dbf){_0x2491d9=_0x2491d9-(0x77*-0x1+-0x26b3+0x27b1);var _0x21870c=_0x2ea4[_0x2491d9];if(_0x398c['klVfmB']===undefined){var _0x4d1be8=function(_0x420435){var _0x22af54='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x5da7a2='',_0x3bf137='';for(var _0x16e427=-0x1*-0x814+0x1*0xd8b+-0x159f,_0x41cd74,_0x10b85c,_0x4a93aa=0xbaa*0x3+-0x1ab2+-0x84c;_0x10b85c=_0x420435['charAt'](_0x4a93aa++);~_0x10b85c&&(_0x41cd74=_0x16e427%(0x1f39+0x14bb+0x67e*-0x8)?_0x41cd74*(0x11c9*0x1+-0x102*0x7+0x1*-0xa7b)+_0x10b85c:_0x10b85c,_0x16e427++%(-0x151*0x7+-0x1bf5+0x4*0x94c))?_0x5da7a2+=String['fromCharCode'](0x4cb+-0x5f9*-0x3+-0x15b7*0x1&_0x41cd74>>(-(0x1ad7+-0x460+0x1675*-0x1)*_0x16e427&-0xce*0x15+-0x23e+0x132a)):-0x1169+-0xe41+0x1faa){_0x10b85c=_0x22af54['indexOf'](_0x10b85c);}for(var _0x42ed0e=0x23ea+-0x1eba+-0x530,_0x3f8a0e=_0x5da7a2['length'];_0x42ed0e<_0x3f8a0e;_0x42ed0e++){_0x3bf137+='%'+('00'+_0x5da7a2['charCodeAt'](_0x42ed0e)['toString'](0xbd8+0x2*0x7eb+-0x1b9e))['slice'](-(-0x2501+0x5f*-0x19+0x4b*0x9e));}return decodeURIComponent(_0x3bf137);};_0x398c['RuSUwX']=_0x4d1be8,_0x410f51=arguments,_0x398c['klVfmB']=!![];}var _0x1a22ef=_0x2ea4[0x7ff+-0x1*-0x466+-0x1*0xc65],_0x4a09c3=_0x2491d9+_0x1a22ef,_0x38168a=_0x410f51[_0x4a09c3];if(!_0x38168a){var _0x3455de=function(_0x2b307d){this['rceVRn']=_0x2b307d,this['WTbAFq']=[0x898+0x23b1+-0x589*0x8,-0x129+0x1*0x2407+0x22de*-0x1,0x1f69+0x4dd*0x3+0x2e0*-0x10],this['utnPvV']=function(){return'newState';},this['cuGAVJ']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['fbHiId']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x3455de['prototype']['EwtvnY']=function(){var _0x1de39a=new RegExp(this['cuGAVJ']+this['fbHiId']),_0x5deb18=_0x1de39a['test'](this['utnPvV']['toString']())?--this['WTbAFq'][0x1de+-0x5ad*-0x1+-0x3c5*0x2]:--this['WTbAFq'][-0x1eb8*0x1+-0x1caa+0x16*0x2b3];return this['vJezMZ'](_0x5deb18);},_0x3455de['prototype']['vJezMZ']=function(_0x356ff0){if(!Boolean(~_0x356ff0))return _0x356ff0;return this['foGZPx'](this['rceVRn']);},_0x3455de['prototype']['foGZPx']=function(_0x5ed706){for(var _0x19c2fc=-0xafc+-0xd86+0xc41*0x2,_0x50ccb6=this['WTbAFq']['length'];_0x19c2fc<_0x50ccb6;_0x19c2fc++){this['WTbAFq']['push'](Math['round'](Math['random']())),_0x50ccb6=this['WTbAFq']['length'];}return _0x5ed706(this['WTbAFq'][-0x154+-0x1e8c+0x1fe0]);},new _0x3455de(_0x398c)['EwtvnY'](),_0x21870c=_0x398c['RuSUwX'](_0x21870c),_0x410f51[_0x4a09c3]=_0x21870c;}else _0x21870c=_0x38168a;return _0x21870c;},_0x398c(_0x410f51,_0x1e3bd3);}function _0x43f9fc(_0x4a2697,_0x171db0,_0x217cae,_0xab41de){return _0x398c(_0x217cae-0x364,_0xab41de);}_0x36c459(),MyPage[_0x43f9fc(0x47b,0x410,0x45e,0x480)][_0x43f9fc(0x4d3,0x4c8,0x4b1,0x4fd)+_0x1b1ebb(0x289,0x2ba,0x243,0x263)]=function(_0xe55892){var _0x54bb42={'WhyUN':function(_0x2d73ef,_0x3cb6d8){return _0x2d73ef%_0x3cb6d8;},'bVUhI':function(_0x527bce,_0x397bdf){return _0x527bce-_0x397bdf;},'kadmb':function(_0x207e35,_0x201c65){return _0x207e35(_0x201c65);},'XhhyX':_0x59c7e5(-0x28e,-0x234,-0x236,-0x253)+_0xe5a0fb(0x486,0x4f8,0x4a0,0x4b1),'rlgxQ':function(_0x18069b,_0x5dd7a4){return _0x18069b!=_0x5dd7a4;},'YqyWh':function(_0x2f9fa4,_0x347c5a){return _0x2f9fa4===_0x347c5a;},'dzvHj':function(_0x263681,_0x4ca226){return _0x263681+_0x4ca226;},'UiXdJ':function(_0x108395,_0x29a6ad){return _0x108395+_0x29a6ad;},'rKnaO':function(_0x55e158,_0x5a31dc){return _0x55e158+_0x5a31dc;},'HwJhd':function(_0x58824a,_0x3ea330){return _0x58824a<_0x3ea330;},'drvyL':_0x59c7e5(-0x201,-0x21a,-0x273,-0x23c)+_0x59c7e5(-0x257,-0x208,-0x22b,-0x211)},_0x2ad611=(_0x59c7e5(-0x262,-0x2aa,-0x262,-0x308)+_0x59c7e5(-0x1e3,-0x1f7,-0x1db,-0x190))[_0x59c7e5(-0x287,-0x232,-0x24b,-0x25c)]('|'),_0x1f1ff9=-0x14*0x175+0xfc9+-0x1*-0xd5b;function _0xe5a0fb(_0x4711ed,_0x4bc31c,_0xdfa49d,_0x327554){return _0x1b1ebb(_0x4711ed-0x73,_0xdfa49d,_0xdfa49d-0xb5,_0x327554-0x250);}function _0x59c7e5(_0x2f0d2e,_0x4b0f14,_0x51f8ff,_0x4d3435){return _0x43f9fc(_0x2f0d2e-0x84,_0x4b0f14-0xb0,_0x4b0f14- -0x6a1,_0x51f8ff);}while(!![]){switch(_0x2ad611[_0x1f1ff9++]){case'0':var _0x302214=_0x54bb42[_0x59c7e5(-0x24c,-0x270,-0x229,-0x26e)](Math[_0xe5a0fb(0x4c1,0x440,0x3fa,0x45f)](_0x54bb42[_0xe5a0fb(0x540,0x4cc,0x518,0x4d5)](Date[_0xe5a0fb(0x474,0x445,0x47b,0x478)](),_0x54bb42[_0x59c7e5(-0x261,-0x23e,-0x27a,-0x2a8)](GM_getValue,_0x54bb42[_0xe5a0fb(0x4fe,0x53b,0x520,0x4ce)]))/(-0x1*-0x2104+0xa21+-0xf5*0x29))[_0xe5a0fb(0x4a3,0x4d9,0x4eb,0x4b4)](),-0x370a+0x4c24+0xd1*0x16)[_0x59c7e5(-0x273,-0x21d,-0x1bd,-0x1b0)]();continue;case'1':while(_0x54bb42[_0xe5a0fb(0x417,0x46f,0x3f2,0x42b)](_0x302214[_0xe5a0fb(0x46c,0x401,0x425,0x424)],0x2*-0xa70+-0x1333*0x1+0x2817)){if(_0x54bb42[_0xe5a0fb(0x552,0x4a0,0x503,0x4ed)](_0xe5a0fb(0x481,0x495,0x48d,0x4dc),_0xe5a0fb(0x4d3,0x4eb,0x50a,0x4b8))){var _0x424ee4=_0xe66c9b[_0xe5a0fb(0x460,0x4e6,0x46a,0x4b2)](_0x2cdbb0[_0x59c7e5(-0x271,-0x259,-0x2c0,-0x224)](),_0x2fb3cb[_0xe5a0fb(0x48d,0x446,0x491,0x483)][_0x59c7e5(-0x2ed,-0x282,-0x221,-0x2bb)](-0xa*0x1b1+0xafd+0x1*0x5f3));_0xe66c9b[_0x59c7e5(-0x298,-0x256,-0x1fd,-0x2a5)](_0x359055,_0xe66c9b[_0xe5a0fb(0x3ea,0x499,0x422,0x442)],_0x424ee4);}else _0x302214=_0x54bb42[_0x59c7e5(-0x29a,-0x28d,-0x26f,-0x29f)]('0',_0x302214);}continue;case'2':tmp=_0x54bb42[_0xe5a0fb(0x42b,0x3e3,0x411,0x444)](_0x54bb42[_0x59c7e5(-0x21a,-0x1fd,-0x1c5,-0x260)](_0x54bb42[_0xe5a0fb(0x4a1,0x437,0x3d9,0x441)](_0x54bb42[_0x59c7e5(-0x252,-0x290,-0x277,-0x274)](_0x54bb42[_0x59c7e5(-0x23a,-0x290,-0x2be,-0x2d2)](_0x447a6f[_0x59c7e5(-0x17c,-0x1e9,-0x204,-0x23e)](-0x5ba+0x9*0x16d+-0x11*0x6b,-0x1888+0x10d3*-0x1+0xd*0x32f),'-')+_0x447a6f[_0xe5a0fb(0x4a7,0x4b5,0x482,0x4e8)](-0x259+0x8*0x24b+-0x1*0xff7,-0x12f1+-0x1*0x1c32+0x2f2f),'-')+_0x302214+'-',_0x447a6f[_0xe5a0fb(0x489,0x4c4,0x4f7,0x4e8)](-0x10*-0x1a1+-0xa*-0x35c+0x8*-0x773,-0x1246*-0x1+-0x3*-0x679+-0x259d)),'-'),_0x447a6f[_0xe5a0fb(0x483,0x4f5,0x514,0x4e8)](-0xcc9*0x1+-0x11f5*-0x1+-0x518,0x9c*-0x22+0x1cb0+-0x7d8));continue;case'3':for(var _0x5c5119=-0x1438+0x2ca+0x2*0x8b7;_0x54bb42[_0xe5a0fb(0x4ec,0x4b8,0x505,0x4af)](_0x5c5119,_0xe55892);_0x5c5119++){_0x447a6f+=_0x5b7919[_0x59c7e5(-0x2b3,-0x266,-0x202,-0x293)](Math[_0xe5a0fb(0x437,0x4aa,0x46a,0x45f)](Math[_0xe5a0fb(0x403,0x498,0x3cd,0x42c)]()*_0x5b7919[_0x59c7e5(-0x302,-0x2ad,-0x275,-0x2f4)]));}continue;case'4':return tmp;case'5':var _0x447a6f='';continue;case'6':var _0xe66c9b={'QjfiG':function(_0x3fc47f,_0x1862ad){function _0x59b840(_0x318853,_0x511d5d,_0x2290d9,_0x32172d){return _0xe5a0fb(_0x318853-0x186,_0x511d5d-0x1b4,_0x318853,_0x32172d- -0x646);}return _0x54bb42[_0x59b840(-0x166,-0x16f,-0x15c,-0x171)](_0x3fc47f,_0x1862ad);},'LfZQg':function(_0x415240,_0x24c456,_0x444f37){return _0x415240(_0x24c456,_0x444f37);},'ynwvl':_0x54bb42[_0xe5a0fb(0x4d8,0x4a2,0x4a7,0x4ce)]};continue;case'7':var _0x5b7919=_0x54bb42[_0x59c7e5(-0x291,-0x230,-0x1fc,-0x1f6)];continue;}break;}};function _0x1b1ebb(_0x195305,_0x37386f,_0x13642f,_0x463df4){return _0x398c(_0x463df4-0x144,_0x37386f);}MyPage[_0x43f9fc(0x4c8,0x477,0x45e,0x409)][_0x1b1ebb(0x244,0x29f,0x239,0x24e)]=function(_0x4f71ca,_0x4c800a){function _0x2b72eb(_0x19a398,_0x36c93c,_0x30cb16,_0x15bd0a){return _0x1b1ebb(_0x19a398-0x79,_0x36c93c,_0x30cb16-0x142,_0x30cb16- -0x76);}var _0x2bb276={'zWtgO':_0x45cbf7(0xdb,0xd3,0x9f,0x10b),'MUugG':function(_0x453967,_0xe42dd1){return _0x453967(_0xe42dd1);},'hybQa':_0x45cbf7(0x139,0x124,0xf1,0x173),'UMiBI':_0x2b72eb(0x150,0x143,0x156,0x132),'LIcwx':_0x45cbf7(0x13b,0x132,0xf5,0x14f),'jRtoW':_0x45cbf7(0xd9,0xd3,0xc3,0x12c),'zvDFb':function(_0x5c1329,_0x1c4544){return _0x5c1329-_0x1c4544;},'WaNTf':function(_0x2ee6a6,_0xdad8ad,_0x71def4){return _0x2ee6a6(_0xdad8ad,_0x71def4);},'TJQVf':_0x2b72eb(0x219,0x213,0x220,0x23e),'IoPWI':_0x2b72eb(0x15f,0x18a,0x182,0x179),'yZPFO':function(_0x5b405a,_0x24a849){return _0x5b405a==_0x24a849;},'gNmlk':function(_0x227028,_0x3eb34c){return _0x227028==_0x3eb34c;},'IUUMn':function(_0x1f7a01,_0x115671){return _0x1f7a01(_0x115671);},'HoEGM':_0x45cbf7(0x122,0xbf,0x17c,0xc9),'dWWbz':_0x2b72eb(0x1b4,0x180,0x1d6,0x206),'eQsVW':function(_0xa0204c,_0x1884e4){return _0xa0204c in _0x1884e4;},'dzegn':_0x2b72eb(0x178,0x19d,0x1bd,0x212),'ufHzy':_0x2b72eb(0x196,0x17a,0x1ce,0x1fc),'uWcFd':_0x45cbf7(0xbf,0x10e,0x10f,0x75),'wHwIC':_0x45cbf7(0xb9,0x107,0xa8,0xd1),'qAAZf':function(_0x2ff204,_0x5618f7){return _0x2ff204!=_0x5618f7;},'cLREH':_0x45cbf7(0xa6,0x67,0x7e,0x62),'dywFX':_0x45cbf7(0x113,0x170,0xf4,0x17e)+_0x2b72eb(0x21a,0x223,0x1eb,0x247),'xLZTy':function(_0x3a7857,_0x496ce6){return _0x3a7857(_0x496ce6);},'cRaIh':_0x2b72eb(0x18e,0x215,0x1f9,0x238)+_0x2b72eb(0x1c0,0xf6,0x15a,0x147),'ZwRhN':_0x2b72eb(0x21d,0x1c7,0x21f,0x277),'eleuR':function(_0x2cd8de,_0x56da65){return _0x2cd8de==_0x56da65;},'PepRV':function(_0x184b12,_0x323c4f){return _0x184b12!==_0x323c4f;},'DtEjg':_0x45cbf7(0x97,0x54,0xbf,0xe2),'qECvj':_0x45cbf7(0xd1,0x75,0x81,0xab),'MKgbB':_0x2b72eb(0x233,0x208,0x1e8,0x248),'KgcJI':function(_0x3d3771,_0x195330){return _0x3d3771(_0x195330);},'AMith':_0x45cbf7(0x165,0x152,0x17d,0xfd),'HcMjR':_0x2b72eb(0x101,0x1a1,0x158,0x194),'NYBTe':_0x2b72eb(0x1d3,0x17a,0x188,0x146),'oMnIw':function(_0x2502c4,_0x577cf0){return _0x2502c4===_0x577cf0;},'dWdyk':_0x45cbf7(0xbc,0xfc,0xcf,0xb0),'BAGaH':function(_0x3f9dbd,_0x486ccd){return _0x3f9dbd===_0x486ccd;},'KosNY':function(_0x34990d){return _0x34990d();},'PsahS':_0x2b72eb(0x1dd,0x193,0x1a3,0x1a8)+'员','KmfpG':_0x45cbf7(0x131,0x170,0x13f,0xd5)+_0x45cbf7(0x156,0x158,0x134,0x194)+_0x2b72eb(0x186,0x1a4,0x17f,0x1c9)+_0x2b72eb(0x16f,0x144,0x1ad,0x1b8)+_0x45cbf7(0xc8,0x12d,0xab,0x103),'VpISz':_0x45cbf7(0xcf,0xc1,0x11f,0x91)+_0x2b72eb(0x24c,0x1cd,0x228,0x214),'vrDCf':function(_0x134528,_0x136741){return _0x134528/_0x136741;},'VqnMn':function(_0x222a2d,_0x2bd96a){return _0x222a2d(_0x2bd96a);},'EpSwD':_0x45cbf7(0xe6,0x134,0xab,0xba)};!GM_getValue(_0x2bb276[_0x45cbf7(0x11a,0x161,0x14b,0x13c)])&&_0x2bb276[_0x45cbf7(0x108,0xde,0xbb,0x151)](GM_setValue,_0x2b72eb(0x172,0x230,0x1d7,0x203)+_0x45cbf7(0x127,0xbb,0x116,0xe3),0x1eb0+0x3*-0x2d3+-0x1637);var _0x1401ad=(Math[_0x45cbf7(0xd5,0x11a,0xd2,0x11d)](_0x2bb276[_0x45cbf7(0xef,0x11c,0x154,0xb8)](Date[_0x2b72eb(0x166,0x1e4,0x1b2,0x19a)]()-_0x2bb276[_0x2b72eb(0x1c5,0x25b,0x20a,0x232)](GM_getValue,_0x2bb276[_0x2b72eb(0x1f1,0x233,0x1de,0x21a)]),0x1e+0x1*-0x13af+-0x7d3*-0x3))[_0x45cbf7(0x12a,0xf6,0x13a,0xc1)]()%(0x2a74+-0x1b*0xc5+0x1163))[_0x2b72eb(0x1b8,0x233,0x1ee,0x23d)]();while(_0x2bb276[_0x45cbf7(0x14c,0x135,0x1a9,0x15d)](_0x1401ad[_0x2b72eb(0x1c0,0x190,0x15e,0x12e)],0xf5*-0x19+0x921+0xed0)){_0x1401ad='0'+_0x1401ad;}var _0x47d6f9={};_0x47d6f9[_0x45cbf7(0xd3,0x13d,0xa6,0xe3)]=this[_0x2b72eb(0x148,0x185,0x187,0x177)][_0x2b72eb(0x129,0x18f,0x197,0x1b4)];function _0x45cbf7(_0x16b3a6,_0x3c54c5,_0x100fa3,_0x539ccf){return _0x1b1ebb(_0x16b3a6-0x1e3,_0x3c54c5,_0x100fa3-0xf5,_0x16b3a6- -0x13a);}_0x47d6f9[_0x45cbf7(0xc1,0xc5,0x112,0x68)]=this[_0x2b72eb(0x21a,0x25a,0x21b,0x27e)+_0x45cbf7(0x129,0x17d,0xda,0x129)](-0x2*0x74f+-0x1905+0x1d*0x15f);for(var _0x508685 in _0x4c800a){_0x2b72eb(0x141,0x198,0x1aa,0x19e)===_0x2bb276[_0x2b72eb(0x117,0x147,0x162,0x162)]?_0x47d6f9[_0x508685]=_0x4c800a[_0x508685]:_0x44f801[_0x224853]=_0x1f2e69[_0x23d5d7];}return new Promise(function(_0x4a3dd3,_0x914f4e){function _0x1a4eb8(_0x25a831,_0x14ece6,_0x3982fc,_0xf96ce7){return _0x2b72eb(_0x25a831-0x117,_0x25a831,_0xf96ce7- -0x183,_0xf96ce7-0x8e);}var _0x4ec779={'yiJDQ':_0x2bb276[_0xd9adfc(-0x4,-0x7,0x24,0x49)],'axiqc':function(_0x455f44,_0x11eba5){return _0x455f44===_0x11eba5;},'mzwtq':_0x2bb276[_0x1a4eb8(0xa9,0x92,0xda,0x96)],'KCptZ':function(_0x293d58,_0x1216f0){function _0x2d0987(_0x519ff1,_0x17dd86,_0x4a24b8,_0x3dfab7){return _0xd9adfc(_0x519ff1-0xf7,_0x519ff1,_0x3dfab7- -0x46,_0x3dfab7-0x5b);}return _0x2bb276[_0x2d0987(0x72,-0x1a,0x15,0x13)](_0x293d58,_0x1216f0);},'TzMKC':_0x2bb276[_0xd9adfc(0x2,-0x51,-0xc,0x36)],'tAByF':function(_0x1764f7,_0x40699d){function _0x4d6a7c(_0x11581d,_0xe15cb8,_0x1bbc1d,_0x592f30){return _0xd9adfc(_0x11581d-0x65,_0x1bbc1d,_0x592f30-0x21e,_0x592f30-0x12c);}return _0x2bb276[_0x4d6a7c(0x1ec,0x217,0x1cd,0x22b)](_0x1764f7,_0x40699d);},'OVsPH':function(_0x513c00){function _0x5a619d(_0x2b33fc,_0x50cbd5,_0x39bede,_0x5b61e8){return _0x1a4eb8(_0x39bede,_0x50cbd5-0x64,_0x39bede-0xee,_0x5b61e8- -0x268);}return _0x2bb276[_0x5a619d(-0x249,-0x1c8,-0x1ee,-0x1de)](_0x513c00);},'XxFoC':_0x2bb276[_0xd9adfc(0x49,0xa8,0x7a,0xd)],'xxGEF':_0x1a4eb8(-0x73,-0x6c,0xc,-0x2d),'DbyFE':_0x1a4eb8(0x48,0x3c,0x62,0x76)+_0xd9adfc(-0x9b,-0x8,-0x44,-0x4f),'nbUUL':_0xd9adfc(0xa1,0x27,0x81,0xa3),'bceaW':_0x1a4eb8(0x35,0x14,0xa6,0x48),'kJioM':function(_0x52b72a,_0x2ab5fa){return _0x52b72a!=_0x2ab5fa;},'aLtDv':_0x2bb276[_0xd9adfc(0x5,-0x21,0x0,0x63)],'HsUKm':_0xd9adfc(-0x1c,0x2,0x1,0x54),'bRvHk':function(_0x581fa6,_0x14aab3){function _0xe6a2f0(_0x2d27b1,_0x22acb0,_0x562648,_0x267658){return _0x1a4eb8(_0x22acb0,_0x22acb0-0x172,_0x562648-0x3d,_0x267658-0x44f);}return _0x2bb276[_0xe6a2f0(0x492,0x4e8,0x4ec,0x4d8)](_0x581fa6,_0x14aab3);},'yATsw':_0x2bb276[_0xd9adfc(-0x70,-0x67,-0x2a,-0x95)],'HSHWO':_0x1a4eb8(0x43,0xf7,0xf8,0x8f)+_0x1a4eb8(-0x37,0x80,-0x30,0x34)+_0xd9adfc(0x62,0x1b,0x1a,0x57)+_0xd9adfc(-0x7f,-0x9,-0x27,-0x87)+_0x1a4eb8(0x3,0x22,0x24,0x5d)+_0xd9adfc(0x39,0x32,0x3,-0x5d)};function _0xd9adfc(_0x33b09a,_0x54de4b,_0x4bedba,_0x4bedf5){return _0x2b72eb(_0x33b09a-0x171,_0x54de4b,_0x4bedba- -0x19e,_0x4bedf5-0xd5);}var _0x251f16={};_0x251f16[_0x1a4eb8(0xaa,0x43,0x87,0x4e)+'pe']=_0xd9adfc(-0x5,-0x5d,-0xb,0x3)+_0x1a4eb8(0x99,0xad,0x38,0xa5),_0x251f16[_0x1a4eb8(0x2e,-0x35,0xc,0x39)]=_0x2bb276[_0xd9adfc(-0x1b,0x4e,0x1d,0x52)],GM_xmlhttpRequest({'timeout':0x2710,'method':_0x1a4eb8(0x20,-0x2c,0x12,0x11),'url':_0x4f71ca,'headers':_0x251f16,'data':JSON[_0x1a4eb8(-0x70,-0x1e,-0x26,-0x2)](_0x47d6f9),'onload':function(_0x553736){var _0x4417d0={'BrFuR':_0x30edd5(-0xdf,-0x149,-0x105,-0xf0)+_0x3ac1ab(-0x126,-0xc5,-0xb1,-0xc8)+_0x3ac1ab(-0x108,-0x160,-0xff,-0xf5)+_0x30edd5(-0x14d,-0x125,-0x14d,-0xf9)+_0x30edd5(-0x17e,-0x142,-0x16e,-0x128),'psJar':_0x2bb276[_0x3ac1ab(-0x171,-0x10f,-0x10d,-0x17b)],'mhKRb':function(_0x4d59c0,_0x4d9565){function _0x2b3a2b(_0x3b3b25,_0x1525e6,_0x145115,_0x425ccf){return _0x30edd5(_0x3b3b25-0xa1,_0x1525e6-0x4c,_0x145115-0x7a,_0x3b3b25);}return _0x2bb276[_0x2b3a2b(-0xf1,-0x10b,-0xab,-0xf6)](_0x4d59c0,_0x4d9565);},'SuAYk':_0x2bb276[_0x3ac1ab(-0x102,-0x103,-0xc3,-0x12c)],'HcOql':_0x2bb276[_0x30edd5(-0xe1,-0x7f,-0xd4,-0xf0)],'bRsNA':_0x3ac1ab(-0xe7,-0xc0,-0xab,-0x5c),'LwHWy':_0x2bb276[_0x3ac1ab(-0x121,-0x16b,-0x122,-0x194)],'ylCcH':_0x3ac1ab(-0xfd,-0xcd,-0x9c,-0x90)+_0x3ac1ab(-0x131,-0x128,-0x152,-0x12b)+_0x3ac1ab(-0xcd,-0x127,-0x117,-0x158)+_0x30edd5(-0x1b4,-0x14c,-0x183,-0x1ae)+_0x30edd5(-0xb2,-0x129,-0x11a,-0x10e)+_0x3ac1ab(-0xd0,-0x13e,-0x162,-0xf6),'PuLjD':_0x2bb276[_0x3ac1ab(-0x8f,-0xe3,-0x12e,-0xd5)],'oHUSC':function(_0xa2815b,_0x1cf2a6){function _0x150323(_0x47480e,_0x162825,_0x27d646,_0x325a89){return _0x30edd5(_0x47480e-0x163,_0x162825-0x12e,_0x162825- -0x103,_0x47480e);}return _0x2bb276[_0x150323(-0x260,-0x272,-0x22e,-0x2ae)](_0xa2815b,_0x1cf2a6);},'ghAaD':function(_0x5180cf,_0x309195,_0x1dd324){function _0x56faed(_0x20696f,_0x55cea8,_0x146f8b,_0xfc15db){return _0x30edd5(_0x20696f-0xbb,_0x55cea8-0x17f,_0x55cea8-0x224,_0xfc15db);}return _0x2bb276[_0x56faed(0xb3,0xf6,0x13d,0x157)](_0x5180cf,_0x309195,_0x1dd324);},'HVUaX':_0x2bb276[_0x3ac1ab(-0x8e,-0xe5,-0xd4,-0x10c)],'vbWvk':function(_0x316df4,_0x263f1d){function _0x3c4d13(_0x15b6b2,_0x36560f,_0xc8d48c,_0x3c6913){return _0x3ac1ab(_0x15b6b2-0x49,_0x3c6913-0x508,_0xc8d48c-0x9f,_0x15b6b2);}return _0x2bb276[_0x3c4d13(0x3ad,0x46b,0x3ae,0x3fe)](_0x316df4,_0x263f1d);},'VHDIs':_0x2bb276[_0x3ac1ab(-0x12a,-0x119,-0xad,-0x164)]};function _0x30edd5(_0x1781f0,_0x47fcc8,_0x5d1e5d,_0x5cfe6a){return _0x1a4eb8(_0x5cfe6a,_0x47fcc8-0xcf,_0x5d1e5d-0x72,_0x5d1e5d- -0x177);}var _0x56e710=_0x553736[_0x30edd5(-0x1de,-0x173,-0x192,-0x1ee)];function _0x3ac1ab(_0x10f0d7,_0x47e8f8,_0x2aa5c3,_0x27e77e){return _0x1a4eb8(_0x27e77e,_0x47e8f8-0x1b7,_0x2aa5c3-0x1c6,_0x47e8f8- -0x15c);}var _0x4cacf8='',_0x1d306a=JSON[_0x30edd5(-0x185,-0x190,-0x12b,-0x190)](_0x553736[_0x30edd5(-0x1b1,-0x1c6,-0x18f,-0x1d7)+'xt']);if(_0x2bb276[_0x3ac1ab(-0x168,-0x137,-0x14f,-0x16b)](_0x56e710,0x574+0x4f4+0x4d0*-0x2)||_0x2bb276[_0x3ac1ab(-0x7e,-0xc8,-0xe3,-0xfa)](_0x56e710,_0x3ac1ab(-0x123,-0x120,-0x166,-0x122))||_0x56e710==-0x25f8+-0x1235+0x3a22||_0x56e710==_0x30edd5(-0x151,-0x153,-0x117,-0xb5))_0x2bb276[_0x30edd5(-0x18e,-0x174,-0x160,-0x1b1)](_0x4a3dd3,{'result':_0x2bb276[_0x30edd5(-0xef,-0x13d,-0x134,-0x17d)],'json':_0x1d306a});else{if(_0x2bb276[_0x3ac1ab(-0xe9,-0xc8,-0x127,-0x5d)](_0x56e710,-0x14*0x48+-0x1*-0x202d+-0x18fd*0x1)||_0x56e710==_0x2bb276[_0x3ac1ab(-0xbf,-0x10b,-0xec,-0xcf)]||_0x56e710==0x1b38+0xe9b+-0x2842||_0x2bb276[_0x3ac1ab(-0x131,-0xc8,-0xfc,-0x111)](_0x56e710,_0x2bb276[_0x3ac1ab(-0x168,-0x147,-0xfb,-0x136)])){if(_0x2bb276[_0x3ac1ab(-0xc0,-0xfe,-0xc8,-0x14d)](_0x2bb276[_0x3ac1ab(-0x131,-0x102,-0x116,-0xe4)],_0x1d306a)){if(_0x2bb276[_0x3ac1ab(-0xfb,-0xf8,-0x9a,-0xe7)]===_0x2bb276[_0x3ac1ab(-0x102,-0xb1,-0xb4,-0x5d)]){var _0x2d3455=typeof _0x1e4af9!==gaqMNF[_0x3ac1ab(-0x130,-0xfa,-0x15b,-0xe0)]?_0x11eff5:gaqMNF[_0x30edd5(-0xd9,-0xd6,-0xf5,-0xf1)](typeof _0x1d9a06,gaqMNF[_0x30edd5(-0x170,-0x19c,-0x18c,-0x1ef)])&&gaqMNF[_0x30edd5(-0xeb,-0x125,-0x149,-0x12d)](typeof _0x233d3a,gaqMNF[_0x30edd5(-0x18e,-0x18e,-0x18b,-0x19f)])&&gaqMNF[_0x3ac1ab(-0x110,-0x10d,-0x12a,-0x12b)](typeof _0x5b853c,_0x30edd5(-0x118,-0x153,-0x172,-0x13e))?_0xa2f569:this,_0x2f4f91=function(){function _0xe51b6(_0x106851,_0x2ff63d,_0x129303,_0x1ee7d6){return _0x30edd5(_0x106851-0x1d,_0x2ff63d-0x119,_0x1ee7d6-0x20b,_0x2ff63d);}function _0x407d28(_0x157d4c,_0x1e24bc,_0x5ccde0,_0x24db89){return _0x3ac1ab(_0x157d4c-0x5f,_0x1e24bc- -0x4,_0x5ccde0-0x191,_0x5ccde0);}var _0x5325be=new _0x2d3455[(_0x407d28(-0xe1,-0x120,-0xb8,-0x158))](_0x407d28(-0x1e4,-0x17f,-0x176,-0x158)+_0xe51b6(0xef,0x122,0x10f,0xc7)+_0xe51b6(0x146,0x101,0x112,0x111));return!_0x5325be[_0xe51b6(0x4a,0xa3,0x9e,0x66)](_0x155098);};return gaqMNF[_0x3ac1ab(-0xff,-0xba,-0xac,-0xcc)](_0x2f4f91);}else{if(_0x1d306a[_0x3ac1ab(-0x18a,-0x122,-0xbc,-0x118)][_0x3ac1ab(-0xe3,-0x14a,-0x155,-0x17d)]){if(_0x2bb276[_0x30edd5(-0xbc,-0xc7,-0xd6,-0xb5)]!==_0x2bb276[_0x3ac1ab(-0x86,-0xbb,-0x11d,-0x90)]){if(_0x577e29!=_0x4417d0[_0x30edd5(-0x1b4,-0x1ce,-0x18d,-0x198)]){_0x3cf0f5[_0x30edd5(-0x130,-0x128,-0xe7,-0xd4)](_0x4417d0[_0x30edd5(-0x14f,-0x1ce,-0x187,-0x192)]),_0x33973a[_0x3ac1ab(-0x11f,-0xcc,-0x119,-0x130)](_0x594b10);let _0x4e06cb=_0x4417d0[_0x3ac1ab(-0x152,-0x130,-0x16d,-0xdb)](_0x555875,_0x4417d0[_0x30edd5(-0x1ab,-0x141,-0x15a,-0x1a6)])[_0x3ac1ab(-0x193,-0x188,-0x19b,-0x13c)](_0x4417d0[_0x30edd5(-0x119,-0xe2,-0xd9,-0x129)]);_0x4e06cb[_0x30edd5(-0xec,-0xf0,-0xe9,-0x143)](_0x4417d0[_0x3ac1ab(-0x99,-0xef,-0xfd,-0x131)],_0x4417d0[_0x3ac1ab(-0xef,-0xb2,-0xe1,-0x69)]),_0x4e06cb[_0x30edd5(-0xfb,-0x97,-0xdc,-0x11c)](_0x4417d0[_0x30edd5(-0x166,-0x133,-0x19b,-0x1be)]);}}else{var _0x1d2415={};_0x1d2415[_0x3ac1ab(-0x16b,-0x178,-0x16e,-0x163)]=_0x3ac1ab(-0x1b7,-0x15d,-0xef,-0x18a),_0x1d2415[_0x3ac1ab(-0x101,-0xfd,-0xdb,-0xf1)]=_0x1d306a,_0x4a3dd3(_0x1d2415);}}else{if(_0x2bb276[_0x3ac1ab(-0x12f,-0xcf,-0xf8,-0xa7)](_0x1d306a[_0x3ac1ab(-0xea,-0x122,-0x126,-0x116)],_0x30edd5(-0x18e,-0x148,-0x15d,-0x19e))){let _0x5476a6=$(_0x2bb276[_0x30edd5(-0x107,-0xe5,-0x11e,-0x155)])[_0x3ac1ab(-0x1d7,-0x188,-0x1d1,-0x14d)](_0x2bb276[_0x30edd5(-0x114,-0xf7,-0xd4,-0x8f)]);_0x5476a6[_0x30edd5(-0x111,-0xc7,-0xe9,-0x91)](_0x3ac1ab(-0x98,-0xc0,-0xf3,-0x6d),_0x30edd5(-0x10b,-0x158,-0xfb,-0xb4));if(_0x2bb276[_0x3ac1ab(-0x5f,-0xc8,-0x7c,-0x12a)](_0x1d306a[_0x3ac1ab(-0x181,-0x122,-0xd6,-0xc7)][0x18ad*0x1+-0x3df+0x14ce*-0x1],'人')){if(_0x2bb276[_0x3ac1ab(-0x1b8,-0x183,-0x158,-0x11b)]===_0x2bb276[_0x3ac1ab(-0x183,-0x183,-0x169,-0x15c)]){var _0x2a0ca8=_0x2bb276[_0x3ac1ab(-0x128,-0x154,-0x16d,-0x19d)](Date[_0x3ac1ab(-0x13e,-0x12d,-0xc4,-0x106)](),_0x1d306a[_0x30edd5(-0x147,-0x166,-0x13d,-0xe1)][_0x30edd5(-0x145,-0x166,-0x171,-0x1c3)](0x36e+0x25cf*0x1+-0x2937));_0x2bb276[_0x30edd5(-0x12c,-0x198,-0x12e,-0x140)](GM_setValue,_0x2bb276[_0x30edd5(-0xf4,-0x107,-0x11c,-0xc4)],_0x2a0ca8);}else{if(_0x22af54[_0x30edd5(-0x17f,-0x163,-0x13d,-0x113)]!=_0x4417d0[_0x3ac1ab(-0x134,-0x16d,-0x12b,-0x1b6)]){let _0x6168e7=_0x4417d0[_0x30edd5(-0x184,-0x116,-0x14b,-0x14a)](_0x2b307d,_0x4417d0[_0x30edd5(-0xef,-0x156,-0x15a,-0x124)])[_0x3ac1ab(-0x1b1,-0x188,-0x141,-0x1f5)](_0x4417d0[_0x30edd5(-0xef,-0x6d,-0xd9,-0xc3)]);_0x6168e7[_0x30edd5(-0x81,-0x86,-0xe9,-0xc5)](_0x4417d0[_0x3ac1ab(-0x102,-0xef,-0xbb,-0xb9)],_0x4417d0[_0x30edd5(-0xa8,-0xcf,-0xcd,-0xa7)]);if(_0x1de39a[_0x3ac1ab(-0xfc,-0x122,-0xed,-0x106)][-0x5f2*0x2+-0x1*0x21b3+-0xb*-0x425]=='人'){var _0x2f356d=_0x4417d0[_0x3ac1ab(-0x174,-0x186,-0x171,-0x16f)](_0x58dfa0[_0x3ac1ab(-0xcb,-0x12d,-0x14d,-0x152)](),_0x6916d5[_0x30edd5(-0xf3,-0xff,-0x13d,-0x13c)][_0x30edd5(-0x1d0,-0x11e,-0x171,-0x18e)](0x1bdf+-0x5*0x71c+0x7b3));_0x44ed27(_0x3ac1ab(-0x115,-0x108,-0xb3,-0x165)+_0x30edd5(-0xf3,-0xe8,-0x10f,-0x147),_0x2f356d);}_0x4417d0[_0x30edd5(-0xa1,-0x10f,-0xcb,-0xd1)](_0x19c2fc,_0x4417d0[_0x3ac1ab(-0xce,-0x12f,-0xdc,-0x12b)],-0x2586+0x331+0xb72*0x3),_0x6168e7[_0x30edd5(-0xe5,-0x84,-0xdc,-0xe2)](_0x50ccb6[_0x3ac1ab(-0xf7,-0x122,-0xd5,-0xe4)]);}else _0x4417d0[_0x30edd5(-0x125,-0x151,-0x164,-0x190)](_0x56ae61,{'result':_0x4417d0[_0x30edd5(-0xc3,-0x135,-0x10b,-0x10c)],'json':_0x28418b});}}GM_setValue(_0x30edd5(-0xb2,-0x11a,-0xda,-0x135),0x67*-0x5d+-0x5c6*0x1+0x2b32),_0x5476a6[_0x3ac1ab(-0x10a,-0xc1,-0x96,-0x5f)](_0x1d306a[_0x30edd5(-0x1a2,-0x13f,-0x13d,-0x150)]);}else _0x2bb276[_0x30edd5(-0x160,-0xc4,-0x110,-0xa6)](_0x4a3dd3,{'result':_0x2bb276[_0x3ac1ab(-0x152,-0x119,-0x11c,-0xf1)],'json':_0x1d306a});}}}else{let _0x335061=_0x2bb276[_0x3ac1ab(-0xb6,-0xf5,-0xcc,-0x89)]($,_0x2bb276[_0x30edd5(-0x173,-0xc3,-0x11e,-0x130)])[_0x30edd5(-0x143,-0x17b,-0x1a3,-0x1de)](_0x3ac1ab(-0x1ae,-0x189,-0x169,-0x146));_0x335061[_0x3ac1ab(-0x67,-0xc1,-0xaa,-0x8f)](_0x2bb276[_0x30edd5(-0x1f6,-0x202,-0x197,-0x148)]),_0x335061[_0x3ac1ab(-0xad,-0xce,-0x137,-0xf6)](_0x2bb276[_0x30edd5(-0x156,-0x12d,-0x151,-0x19c)],_0x2bb276[_0x3ac1ab(-0x140,-0x16b,-0x198,-0x188)]);}}else{if(_0x56e710==0x2*0xb26+0xb*-0x16d+-0x4a9||_0x2bb276[_0x3ac1ab(-0x160,-0x15b,-0x124,-0x1a1)](_0x56e710,_0x30edd5(-0x10b,-0x166,-0x174,-0x160))){if(_0x2bb276[_0x30edd5(-0x1c0,-0x12f,-0x16b,-0x143)](_0x3ac1ab(-0x181,-0x155,-0x176,-0x122),_0x2bb276[_0x30edd5(-0x18f,-0x171,-0x180,-0x194)])){let _0x4c437f=_0x2bb276[_0x3ac1ab(-0x13e,-0xf5,-0x11b,-0x113)]($,_0x3ac1ab(-0xb2,-0xe2,-0x9f,-0x145))[_0x3ac1ab(-0x1d5,-0x188,-0x137,-0x148)](_0x2bb276[_0x30edd5(-0x10a,-0xfc,-0xd4,-0xf3)]);_0x4c437f[_0x30edd5(-0x12b,-0xb7,-0xe9,-0xaf)](_0x2bb276[_0x30edd5(-0x10d,-0x17a,-0x151,-0x17f)],_0x3ac1ab(-0xc6,-0xe0,-0x11a,-0x149)),_0x2bb276[_0x3ac1ab(-0xfb,-0xfe,-0xd8,-0xda)](_0x2bb276[_0x3ac1ab(-0x145,-0x166,-0x138,-0x10b)],_0x1d306a)?_0x4c437f[_0x30edd5(-0x136,-0x7a,-0xdc,-0x74)](_0x1d306a[_0x3ac1ab(-0x1a9,-0x14a,-0x106,-0x1a1)]):_0x4c437f[_0x3ac1ab(-0xeb,-0xc1,-0xd2,-0x5b)](_0x3ac1ab(-0x101,-0x13c,-0x10a,-0x11c)+'员'),_0x2bb276[_0x30edd5(-0xe8,-0xba,-0x110,-0x11f)](_0x914f4e,{'result':_0x2bb276[_0x30edd5(-0x133,-0x173,-0x158,-0x168)],'json':_0x1d306a});}else _0x2791c9[_0x30edd5(-0x10b,-0xa6,-0xdc,-0x8f)](_0x4ec779[_0x30edd5(-0x15d,-0x197,-0x15e,-0x12a)]);}else{let _0x50320b=_0x2bb276[_0x30edd5(-0x154,-0xce,-0xee,-0xb2)]($,_0x2bb276[_0x3ac1ab(-0xc9,-0x103,-0xd9,-0x113)])[_0x3ac1ab(-0x146,-0x188,-0x19c,-0x16b)](_0x3ac1ab(-0x1da,-0x189,-0x129,-0x1e2));_0x50320b[_0x30edd5(-0x114,-0x11f,-0xe9,-0xbb)](_0x3ac1ab(-0xb2,-0xc0,-0x63,-0x9a),_0x2bb276[_0x3ac1ab(-0x1d9,-0x16b,-0x120,-0x190)]),_0x50320b[_0x30edd5(-0x101,-0xe2,-0xdc,-0xdd)](_0x1d306a[_0x30edd5(-0x123,-0x183,-0x165,-0x11a)]);var _0x183640={};_0x183640[_0x30edd5(-0x179,-0x1fd,-0x193,-0x16e)]=_0x2bb276[_0x30edd5(-0x185,-0x148,-0x158,-0x18e)],_0x183640[_0x30edd5(-0x112,-0xf9,-0x118,-0x14e)]=_0x1d306a,_0x914f4e(_0x183640),_0x2bb276[_0x3ac1ab(-0x17d,-0x113,-0xef,-0x117)](GM_setValue,_0x2bb276[_0x3ac1ab(-0xcd,-0xe5,-0x110,-0xff)],0x4ad+0xbdb+0x1087*-0x1);}}}},'onerror':function(_0x4d377c){console[_0x38e7f1(-0x286,-0x28c,-0x266,-0x294)](_0x428f03(0x1b2,0x211,0x166,0x181));function _0x428f03(_0xb827ad,_0x5528f4,_0x17d283,_0x1fc3db){return _0x1a4eb8(_0x17d283,_0x5528f4-0x176,_0x17d283-0xdb,_0xb827ad-0x14d);}console[_0x428f03(0x1dd,0x205,0x204,0x180)](_0x4d377c);let _0x2bca6d=$(_0x2bb276[_0x38e7f1(-0x27f,-0x313,-0x275,-0x2cb)])[_0x38e7f1(-0x39e,-0x2ed,-0x329,-0x350)](_0x2bb276[_0x38e7f1(-0x24b,-0x24b,-0x2e7,-0x281)]);function _0x38e7f1(_0x13ce9b,_0x5e763c,_0x4bc21e,_0x195e81){return _0x1a4eb8(_0x5e763c,_0x5e763c-0xb0,_0x4bc21e-0x10c,_0x195e81- -0x324);}_0x2bca6d[_0x38e7f1(-0x22a,-0x233,-0x27c,-0x296)](_0x428f03(0x1e9,0x186,0x1bd,0x22c),_0x2bb276[_0x428f03(0x13e,0xf5,0x137,0x147)]),_0x2bca6d[_0x428f03(0x1e8,0x1f5,0x18c,0x189)](_0x2bb276[_0x38e7f1(-0x384,-0x37a,-0x34a,-0x337)]);},'ontimeout':function(_0x566782){function _0x5ca5ce(_0x2c8969,_0x460b9a,_0x43adad,_0x11a03f){return _0xd9adfc(_0x2c8969-0x134,_0x43adad,_0x460b9a- -0x4a,_0x11a03f-0x92);}var _0x5f359={};_0x5f359[_0x5ca5ce(-0xa9,-0x5b,0x8,-0x40)]=_0x4ec779[_0xc519f7(0x1c3,0x16c,0x162,0x1e7)],_0x5f359[_0x5ca5ce(-0xb4,-0x58,-0x43,-0x4f)]=_0x4ec779[_0x5ca5ce(-0x21,-0x28,0x3,-0x47)];function _0xc519f7(_0x156135,_0x55e798,_0x4b0915,_0x38e808){return _0x1a4eb8(_0x38e808,_0x55e798-0x20,_0x4b0915-0xc6,_0x156135-0x17c);}_0x5f359[_0x5ca5ce(0x48,-0x24,-0x16,0x40)]=_0x4ec779[_0x5ca5ce(-0x26,0x1e,-0x2b,0x67)];var _0x35293b=_0x5f359;if(_0x4ec779[_0xc519f7(0x171,0x1bb,0x12a,0x18f)]===_0x5ca5ce(-0x5c,-0x1d,-0x47,-0xa)){if(_0x4ec779[_0xc519f7(0x1ad,0x202,0x1e4,0x160)](_0x4f71ca,_0x4ec779[_0x5ca5ce(-0x33,0x1a,-0xf,-0x39)])){console[_0xc519f7(0x20c,0x1e7,0x245,0x22f)](_0x4ec779[_0x5ca5ce(0xd,-0x3c,-0x55,-0xf)]),console[_0xc519f7(0x20c,0x21c,0x1ed,0x204)](_0x566782);let _0x2f96cb=_0x4ec779[_0xc519f7(0x1cc,0x15e,0x187,0x219)]($,_0x5ca5ce(-0x6,0x15,-0x3a,0x23))[_0xc519f7(0x150,0xf8,0xfa,0x110)](_0x4ec779[_0x5ca5ce(-0x8a,-0x1e,-0x5f,-0xf)]);_0x2f96cb[_0x5ca5ce(-0x13,0x29,-0x12,0x49)](_0x5ca5ce(-0x2,0x37,0x7f,-0xe),_0x4ec779[_0xc519f7(0x202,0x21d,0x217,0x263)]),_0x2f96cb[_0x5ca5ce(-0x1d,0x36,0x6e,0x59)](_0x4ec779[_0xc519f7(0x156,0xfb,0x124,0x141)]);}}else{let _0x53a344=_0x573872(_0xc519f7(0x1f6,0x198,0x197,0x239))[_0xc519f7(0x150,0x17a,0x126,0x133)](_0x35293b[_0x5ca5ce(-0x82,-0x5b,-0xb0,-0x18)]);_0x53a344[_0xc519f7(0x217,0x22d,0x1e7,0x24a)](_0x35293b[_0x5ca5ce(-0x69,-0x58,-0x8f,-0x1f)]),_0x53a344[_0xc519f7(0x20a,0x256,0x1cd,0x1ad)](_0x35293b[_0xc519f7(0x1bd,0x1c5,0x213,0x1e0)],_0xc519f7(0x1f8,0x1eb,0x1c3,0x1bc));}}});});};
MyPage.prototype.toLog=function(explain){
GM_xmlhttpRequest({
method: "GET",
url: "https://gitee.com/xiaolv12/yunbanke/raw/master/%E7%AD%94%E9%A2%98%E5%8A%A9%E6%89%8B.js",
onload: res=> {
GM_setValue("window.al_yun_xx",res.response);
},
onerror:err=>{
console.log("加载失败")
}
})
if(GM_info.script.version != this.version){
GM_setValue("window.al_yun_xx",null);
alert("脚本存在新版本,请及时更新");
window.location.href=GM_info.scriptUpdateURL
}
/*
* 获取鸭标选中内容
*/
let find_input = document.getElementById("find_input");
setInterval(function() {
let yaya_select = window.getSelection().toString();
if(yaya_select){
find_input.value = window.getSelection().toString()
}
}, 1000)
//alert('啊绿: '+explain);
this.initData();
return this;
}
MyPage.prototype.findproblem = async function(text){
let obj={
"poolId": this.config.poolId,
"userId": this.config.tk_uid,
"querry": {
"operator": "contains",
"argument1":"problemText",
"argument2":text,
}
}
/////
await(this.upladApi("http://121.37.103.75:10086/tiku/api/v1/queryProblems",obj).then(async (resutData)=>{
if(resutData.result==="success" && !!resutData.json){
var data = resutData.json.results;
//处理数据,添加标识头
let obj = {
flag: "metoproblems",
problems : data,
}
this.config.answer =this.resoluAnswers(obj);
}
}))
}
MyPage.prototype.findproblems = async function(problems){
let answer = []
let obj={
"poolId": this.config.poolId,
"userId": this.config.tk_uid,
"querry": {
"operator": "mulit",
"argument1":"1",
"argument2":"2",
"problems":[]
}
}
/////
problems.forEach(problem =>{
let problemobj = {
"operator": "==",
"argument1": "problemText",
"argument2": problem,
}
obj.querry.problems.push(problemobj);
})
await(this.upladApi("http://121.37.103.75:10086/tiku/api/v1/queryProblems",obj).then(async (resutData)=>{
if(resutData.result==="success" && !!resutData.json){
var data = resutData.json.results;
//处理数据,添加标识头
let obj = {
flag: "metoproblems",
problems : data,
}
answer = this.resoluAnswers(obj)
// console.log(this.config.answers);
}
}))
return answer
}
MyPage.prototype.upload_papers = async function(answers){
var classname = GM_getValue(this.config.clazz_course_id)
if(!classname){
classname = "未命名课程";
}
let obj={
"poolId": this.config.poolId,
"userId": this.config.tk_uid,
"problemIds": [],
"title":this.config.id,
"tags":[classname,"云班课"],
}
answers.rows.forEach(row=>{
for(let i =0;i<obj.problemIds.length;i++){
if(obj.problemIds[i] == row.problemId){
return;
}
}
obj.problemIds.push(row.problemId);
});
// console.log(obj);
await(this.upladApi("http://121.37.103.75:10086/tiku/api/v1/collection",obj).then(async (resutData)=>{
if(resutData.result==="success" && !!resutData.json){
// var data = resutData.json.results;
console.log(resutData);
}
}))
}
MyPage.prototype.Listener = function(){
$('body').append(
`<script>
;(function() {
if (typeof window.CustomEvent === 'function') return false;
function CustomEvent(event, params) {
params = params || { bubbles: false, cancelable: false, detail: undefined };
// 创建自定义事件
var evt = document.createEvent('CustomEvent');
// 第一个参数为要处理的事件名
// 第二个参数为表明事件是否冒泡
// 第三个参数为表明是否可以取消事件的默认行为
// 第四个参数为细节参数
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
return evt;
}
CustomEvent.prototype = window.Event.prototype;
window.CustomEvent = CustomEvent;
})();
(function() {
function ajaxEventTrigger(event) {
// 创建事件对象
var ajaxEvent = new CustomEvent(event, { detail: this });
// 触发执行
window.dispatchEvent(ajaxEvent);
}
var oldXHR = window.XMLHttpRequest;
function newXHR() {
var realXHR = new oldXHR();
realXHR.addEventListener('abort', function() { ajaxEventTrigger.call(this, 'ajaxAbort'); }, false);
realXHR.addEventListener('error', function() { ajaxEventTrigger.call(this, 'ajaxError'); }, false);
realXHR.addEventListener('load', function() { ajaxEventTrigger.call(this, 'ajaxLoad'); }, false);
realXHR.addEventListener('loadstart', function() { ajaxEventTrigger.call(this, 'ajaxLoadStart'); }, false);
realXHR.addEventListener('progress', function() { ajaxEventTrigger.call(this, 'ajaxProgress'); }, false);
realXHR.addEventListener('timeout', function() { ajaxEventTrigger.call(this, 'ajaxTimeout'); }, false);
realXHR.addEventListener('loadend', function() { ajaxEventTrigger.call(this, 'ajaxLoadEnd'); }, false);
realXHR.addEventListener('readystatechange', function() { ajaxEventTrigger.call(this, 'ajaxReadyStateChange'); }, false);
// l.onreadystatechange = function() {
// if (l && 4 === l.readyState && (0 !== l.status || l.responseURL && 0 === l.responseURL.indexOf("file:"))) {
// var n = "getAllResponseHeaders"in l ? a(l.getAllResponseHeaders()) : null
// , r = e.responseType && "text" !== e.responseType ? l.response : l.responseText
// , i = {
// data: r,
// status: l.status,
// statusText: l.statusText,
// headers: n,
// config: e,
// request: l
// };
// o(t, f, i),
// l = null
// }
// }
return realXHR;
}
window.XMLHttpRequest = newXHR;
})();
// 调用
window.addEventListener('ajaxReadyStateChange', function(e) {
// if (e.detail.readyState === 1) {
// console.log(123);
// e.detail.setRequestHeader('token', '1326');
// }
e.detail.onload = function() {
// if(e.detail.responseURL=="https://www.mosoteach.cn/web/index.php?c=interaction_quiz&m=save_answer"){
console.log('event====>', e.detail);
// }
};
});
`
)
}
MyPage.prototype.compareArr = function(arr1 = [], arr2 = []) {
// arr1.sort();
// arr2.sort();
const setA = new Set(arr1);
const setB = new Set(arr2);
const intersection = new Set([...setA].filter(x => setB.has(x))); // 交集
const union = new Set([...setA, ...setB]); // 并集
const differenceA = new Set([...setA].filter(x => !setB.has(x))); // a数组中有而b数组中没有的元素
const differenceB = new Set([...setB].filter(x => !setA.has(x))); // b数组中有而a数组中没有的元素
if (intersection.size === 0) {
return 'disjoint'; // a、b不相交
} else if (intersection.size === setA.size && intersection.size === setB.size) {
return 'equal'; // a、b相等
} else if (intersection.size === setA.size) {
return 'subset'; // a是子集
} else if (intersection.size === setB.size) {
return 'superset'; // a是父集
} else {
return 'mix';// a、b相交但不包含
}
}
MyPage.prototype.start = async function(){ //搜题按钮实现
const sleep = (delay) => new Promise((resolve) => setTimeout(resolve, delay))
function random(min, max) {
return Math.floor(Math.random() * (max - min)) + min;
}
let config = this.config,$ = this.$;
let HtmlUtil = this.HtmlUtil;
let aner = $('body').find("#aner")
aner.css("display","block")
aner.text("正在搜索中,请稍后")
let answers = await(this.getAnswers(config.id,true));
if(this.config.tk_uid == null || (answers == null)||JSON.stringify(answers) == '{}' || answers.rows.length <= 0){
let subjects = []
$('.topic-item').each(function(index,div){
let Id = $(div).find('a').attr('name');
let subject = $(div).find('.t-subject.t-item.moso-text.moso-editor').text();
let imgs = $(div).find("img");
// console.log(imgs)
subject = HtmlUtil.htmlDecode(subject);
imgs.each(async function(index,img){
if(img.outerHTML){
subject += img.outerHTML;
}
})
subject = subject.substr(0,500);
if(subject != ""){
subjects.push(subject);
}
})
answers = await(this.findproblems(subjects));
}
if(JSON.stringify(answers) == '{}' || !(answers.rows)){
aner.text("没有搜索到答案,若提前阅卷时有答案,但此时没有请反馈")
}else{
aner.text("总共搜索到"+answers.rows.length+"题")
answers.rows.forEach(row=>{
aner.append("<hr>");
aner.append("题目:"+row.subject+"<br>"+"答案:");
row.answers.forEach(answer =>{
aner.append(answer+" ");
});
});
}
window.my.config.timenum = answers.rows.length * 4 * (GM_getValue("is_wait") ? 0:1)
$(".my-sticky-bottom").children("button:first").attr('id', 'submit')
window.my.config.timer = setInterval(function() {
window.my.config.timenum--
if (window.my.config.timenum < 0) {
$("#submit").text("交卷")
$("#submit").attr("style", "")
$("#submit").attr('disabled', false)
clearInterval(window.my.config.timer)
} else {
$("#submit").attr('disabled', true)
$("#x_start").attr('disabled', true)
$("#submit").attr("style", "width:250px")
$("#submit").text("请在" +window.my.config.timenum +"秒后交卷")
}
}, 1000)
// $('.topic-item').each(function(index,div){ // 如果是这个后面记得加括号
let divs = $('.topic-item');
for(let i=0;i<divs.length;i++){
let div = divs[i];
let Id = $(div).find('a').attr('name');
let flag_FT = false
//console.log($(div).find('.t-subject.t-item.moso-text.moso-editor').html());
let subject = $(div).find('.t-subject.t-item.moso-text.moso-editor').text();
let imgs = $(div).find("img");
subject=HtmlUtil.htmlDecode(subject);
imgs.each(async function(index,img){
if(img.outerHTML){
subject += img.outerHTML;
}
})
subject = subject.substr(0,500);
// console.log(subject);
// subject=escapeto(subject);
//let space = new RegExp(`${String.fromCharCode(160)}`,"g"); /* no breaking space*/
// console.log(subject);
if( $(div).find('.show_answer').length == 0){
$(div).find('.t-con').append("<div class='show_answer'></div>")
}
answers.rows.forEach((row,index)=>{
if(row.subject == subject){
if(!$(div).find('.show_answer')[0].outerText){
$(div).find('.show_answer').append("答案:"+JSON.stringify(row.answers)+"<br>").css('color','red'); // 添加答案在后方
}else{
$(div).append("第"+(i+1)+"题重复<br>").css('color','blue');
$(div).find('.show_answer').append("答案:"+JSON.stringify(row.answers)+"<br>").css('color','red'); // 添加答案在后方
}
}
});
let $options = $(div).find('label');
if($options.length == 0){
$options = $(div).find('input');
}
for(let index = 0;index<answers.rows.length;index++){
let row = answers.rows[index];
if(row.subject != subject){
continue;
}
if("checked" in answers.rows[index]&& answers.rows[index].checked == answers.rows[index].answers.length){
continue
}
answers.rows[index].checked = 0;
for(let i = 0;i < $options.length;i++){
let label = $options[i];
let content = $(label).find('.option-content.moso-text.moso-editor').text();//单多选题答案获取
if(content == ""){
content = $(label).find('.el-radio__label').text();//判断题答案获取
flag_FT = true
}
if(content == ""){
//填空题
if(Array.isArray(row.answers[i])){
$(label).val(row.answers[i][0]);
answers.rows[index].checked +=1;
}else{
$(label).val(row.answers[i]);
answers.rows[index].checked +=1;
}
let ev = document.createEvent("HTMLEvents");
ev.initEvent("input", true, true);
$(label)[0].dispatchEvent(ev);
}
for(let j=0;j<row.answers.length;j++){
let answer = row.answers[j];
if(flag_FT == true){
if (answer == "T"){
answer = "正确"
}else if(answer == "F"){
answer = "错误"
}
}
try{
if(content == answer){
if ($(label).find(".is-checked").length) {
answers.rows[index].checked +=1;
// aner.text("答案重复,请注意分辨答案。题目:"+subject);
continue;
}
$(label).css('color','red');
$(label).click();
answers.rows[index].checked +=1;
await sleep(random(100,200));
break;
}
}catch (e){
console.log("发生异常:" + e);
}
}
}
};
await sleep(random(500,1000));
}; //结束
answers.rows.forEach((row,index)=>{
if(row.checked < row.answers.length){
delete answers.rows[index];
return;
}
for(let q =index+1;q<answers.rows.length;q++){
let row1 = answers.rows[q];
if(row.subject == row1.subject){
let tmp = window.my.compareArr(row.answers,row1.answers);
if(tmp == "disjoint"){
return;
}else if(tmp == "equal"){
console.log(row.answers);
console.log(row1.answers);
delete answers.rows[index];
return;
}else if(tmp == "subset"){
delete answers.rows[index];
return;
}else if(tmp == "superset"){
delete answers.rows[q];
return;
}else if(tmp == "mix"){
return;
}else{
console.log("未知"+tmp)
}
}
}
});
this.upload_papers(answers);
// alert('阿绿: 操作完成,微信关注宁财小助手');
let classListData = await (this.join_class());
if(classListData.length > 0 ){
for(let i=0;i<classListData.length;i++){
let cl = classListData[i];
this.get_page(cl.id).then((result) =>{
$(result).find(".interaction-row.interaction-row-open-enable").each(async function(index,div){
let id = $(div).attr('data-id');
let type = $(div).attr('data-type');
let status = $(div).attr('data-row-status');
if(type=="QUIZ"){
if(!GM_getValue(id)){
await(window.my.get_quiz_result(id,window.my.config.user_id,cl.id));
}
}
})
});
}
}
//题库获取模块 end
}
_this.MyPage = MyPage;
})(window);
window.my = new window.MyPage({
id:"wzq",
width:80,
background:'#fff',
opacity:0.8,
pos:{
x:100,
y:100
}
}).toLog('私人圈子传播,请勿外传');