// ==UserScript== // @name FCQ网课通助手[全网题库][通用智能适配答题][刷课] // @namespace http://tampermonkey6.net // @version 1.0.43.26 // @description 支持【超星学习通】【智慧树】【职教云系列】【雨课堂】【考试星】【168网校】【u校园】【大学MOOC】【云班课】【优慕课】【继续教育类】【绎通云课堂】【九江系列】【柠檬文才】【亿学宝云】【优课学堂】【小鹅通】【安徽继续教育】 【上海开放大学】 【华侨大学自考网络助学平台】【良师在线】【和学在线】【人卫慕课】【国家开放大学】【山财培训网(继续教育)】【浙江省高等学校在线开放课程共享平台】【国地质大学远程与继续教育学院】【重庆大学网络教育学院】【浙江省高等教育自学考试网络助学平台】【湖南高等学历继续教育】【优学院】【学起系列】【青书学堂】【学堂在线】【英华学堂】【广开网络教学平台】等平台的测验考试,内置题库,如有疑问或无法使用加群:693421447 咨询 // @author button2 // @match *://*/* // @run-at document-start // @resource Table https://www.forestpolice.org/ttf/2.0/table.json // @require https://lib.baomitu.com/promise-polyfill/8.3.0/polyfill.min.js // @require https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/jquery/3.6.0/jquery.min.js // @require https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js // @require https://cdn.staticfile.org/jquery/3.6.0/jquery.min.js // @require https://lib.baomitu.com/jquery/3.6.0/jquery.min.js // @require https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/fingerprintjs2/2.1.4/fingerprint2.min.js // @require https://cdn.staticfile.org/fingerprintjs2/2.1.4/fingerprint2.min.js // @require https://cdn.jsdelivr.net/npm/fingerprintjs2@2.1.4/dist/fingerprint2.min.js // @grant GM_xmlhttpRequest // @grant GM_addStyle // @grant GM_getValue // @grant GM_setValue // @grant GM_listValues // @grant GM_deleteValue // @grant GM_getResourceText // @grant GM_getResourceURL // @grant GM_addValueChangeListener // @grant GM_removeValueChangeListener // @grant GM_openInTab // @grant GM_getTab // @grant GM_saveTab // @grant GM_getTabs // @grant GM_registerMenuCommand // @grant GM_unregisterMenuCommand // @grant GM_setClipboard // @grant GM_notification // @grant GM_webRequest // @grant GM_addElement // @grant GM_download // @grant GM_log // @grant GM_info // @connect gitee.com // @connect cdn.staticfile.org // @connect cdnjs.cloudflare.com // @connect cdn.bootcss.com // @connect cdn.bootcdn.net // @connect cdn.staticfile.org // @connect unpkg.com // @connect www.e-campus.top // @connect www.ncoa.org.cn // @connect bytecdntp.com // @connect icve.com.cn // @connect icodef.com // @connect muketool.com // @connect ouchn.cn // @connect xuetangx.com // @connect yuketang.cn // @connect jpush.cn // @connect unipus.cn // @connect www.kinglinkcrusher.com // @connect greasyfork.org // @connect smartedu.cn // @connect zhihuishu.com // @connect chaoxing.com // @connect gaoxiaobang.com // @connect njcedu.com // @connect jsou.cn // @connect ulearning.cn // @connect kaoshixing.com // @connect gaoxiaobang.com // @connect open.com.cn // @connect sflep.com // @connect teacher.com.cn // @connect chinaedu.net // @connect sccchina.net // @connect netinnet.cn // @connect learnin.com.cn // @connect ct-edu.com.cn // @connect ismartlearning.cn // @connect youshiyun.com.cn // @connect qdjxjy.com.cn // @connect icourse163.org // @connect webtrn.cn // @connect gxmzu.edu.cn // @connect learn.courshare.cn // @connect haipan.net // @connect xiguashuwang.com // @connect jiaoyu139.com // @connect ahjxjy.cn // @connect qingshuxuetang.com // @connect 168wangxiao.com // @connect xiaoe-tech.com // @connect shou.org.cn // @connect edu-xl.com // @connect hexuezx.cn // @connect pmphmooc.com // @connect lyck6.cn // @connect yinghuaonline.com // @connect forchange.cn // @connect tencent.com // @connect chatforai.cc // @connect aigcfun.com // @connect theb.ai // @connect binjie.site // @connect xgp.one // @connect luntianxia.uk // @connect 51buygpt.com // @connect extkj.cn // @connect xjai.cc // @connect zw7.lol // @connect xeasy.me // @connect aifree.site // @connect wuguokai.top // @connect aidutu.cn // @connect leiluan.cc // @connect gptservice.xyz // @connect gpt66.cn // @connect ai.ls // @connect letsearches.com // @connect powerchat.top // @connect wobcw.com // @connect 68686.ltd // @connect t66.ltd // @connect t-chat.cn // @connect aitianhu.com // @connect anzz.top // @connect ohtoai.com // @connect freeopenai.xyz // @connect supremes.pro // @connect bnu120.space // @connect free-chat.asia // @connect aifks001.online // @connect a0.chat // @connect usesless.com // @connect ftcl.store // @connect sunls.me // @connect pizzagpt.it // @connect phind.com // @connect bushiai.com // @connect qdymys.cn // @connect pp2pdf.com // @connect aichatos.cloud // @connect fakeopen.com // @connect wuguokai.cn // @connect gtpcleandx.xyz // @connect esojourn.org // @connect cveoy.top // @connect chatcleand.xyz // @connect 154.40.59.105 // @connect gptplus.one // @connect xcbl.cc // @connect hz-it-dev.com // @connect 6bbs.cn // @connect toyaml.com // @connect 38.47.97.76 // @connect lbb.ai // @connect lovebaby.today // @connect gamejx.cn // @connect chat86.cn // @connect ai001.live // @connect ai003.live // @connect ai006.live // @connect promptboom.com // @connect hehanwang.com // @connect caipacity.com // @connect chatzhang.top // @connect 51mskd.com // @connect forwardminded.xyz // @connect 1chat.cc // @connect minimax.chat // @connect cytsee.com // @connect skybyte.me // @connect alllinkai1.com // @connect baidu.com // @connect geekr.dev // @connect chatgptdddd.com // @connect anfans.cn // @connect bing.com // @connect openai.com // @connect aliyun.com // @connect ai-yuxin.space // @connect yuxin-ai.com // @connect xfyun.cn // @connect geetest.com // @connect tiangong.cn // @connect yeyu1024.xyz // @connect chatglm.cn // @connect bigmodel.cn // @connect gptgo.ai // @connect chat.360.cn // @connect mixerbox.com // @connect ohmygpt.com // @connect muspimerol.site // @connect frechat.xyz // @connect youdao.com // @connect youkexuetang.cn // @connect cx-online.net // @connect sxmaps.com // @connect eswonline.com // @connect ketangx.net // @connect weirenzheng.cn // @connect cqooc.com // @connect edu-edu.com.cn // @connect fjnu.cn // @connect yxbyun.com // @connect kaoshixing.com // @connect beeouc.com // @connect edu-edu.com // @connect bossyun.com // @connect reseayun.com // @connect sww.com.cn // @connect jinkex.com // @connect zikaoj.com // @connect ls365.net // @connect 91huayi.com // @connect shandong-energy.com // @connect ttcdw.cn // @connect wjx.top // @connect coursera.org // @connect ahjxjy.cn // @connect hbcjpt.com // @connect whu.edu.cn // @connect xjyxjyw.com // @connect yxlearning.com // @connect aqscpx.com // @connect dayoo.com // @connect ncme.org.cn // @connect tikuhai.com // @connect enncy.cn // @connect ocsjs.com // @connect mhtall.com // @connect ustcyun.cn // @connect 0991xl.com // @connect hbysw.org // @connect cj-edu.com // @connect gzbjyzjxjy.cn // @connect superchutou.com // @connect zaixiankaoshi.com // @connect ynjspx.cn // @connect zhifa315.com // @connect jxjypt.cn // @connect hnzkw.org.cn // @connect wentaionline.com // @connect chinahrt.com // @connect ha.cn // @connect tv168.cn // @connect 59iedu.com // @connect cdeledu.com // @connect cncecyy.com // @connect jste.net.cn // @connect ls365.net // @connect brjxjy.com // @connect dyhrsc.cn // @connect vmserver.cn // @connect qdu.edu.cn // @connect xidian.edu.cn // @connect swust.net.cn // @connect ggcjxjy.cn // @connect hebyunedu.com // @connect ncu.edu.cn // @connect jijiaool.com // @connect zikaosw.cn // @connect cmechina.net // @connect ewt360.com // @connect qlteacher.com // @connect mxdxedu.com // @connect ityxb.com // @connect uooc.net.cn // @connect scxfks.com // @connect tsinghuaelt.com // @connect enaea.edu.cn // @connect gzsrs.cn // @connect yanxiu.com // @connect zxhnzq.com // @connect chinaacc.com // @connect ncet.edu.cn // @connect tcmjy.org // @connect baidu.com // @connect xidian.edu.cn // @connect whut.edu.cn // @connect yooc.me // @connect cj-edu.com // @connect cncecyy.com // @connect cjnep.net // @connect zikao365.com // @connect enetedu.com // @connect xueyinonline.com // @connect kepeiol.com // @connect brjxjy.com // @connect ketangx.net // @connect chinamde.cn // @connect examcoo.com // @connect 345u.net // @connect zgzjzj.com // @connect twt.edu.cn // @connect jctnb.org.cn // @connect 21tb.com // @connect zj.gov.cn // @connect zikaosw.cn // @connect spicti.com // @connect haoyisheng.com // @connect enaea.edu.cn // @connect gzsrs.cn // @connect yanxiu.com // @connect ncet.edu.cn // @connect chinahrt.com // @connect zxhnzq.com // @connect ghlearning.com // @connect qlu.edu.cn // @connect baidu.com // @connect hii.cn // @connect hustsnde.com // @connect zgzjzj.com // @connect peishenjy.com // @connect axetk.cn // @connect ipmph.com // @connect hnscen.cn // @connect coursera.cn // @connect udemy.cn // @connect edx.cn // @connect wutp.com // @connect imu.edu.cn // @connect mhys.com.cn // @connect cumt.edu.cn // @connect scit-edu.cn // @connect smartchutou.com // @connect anpeiwang.com // @connect gdut.edu.cn // @connect dwzpzx.com // @connect gzucm.edu.cn // @connect jxuas.edu.cn // @connect 51sunshining.com // @connect hzau.edu.cn // @connect tisco.com.cn // @connect myunedu.com // @connect snnu.edu.cn // @connect hiaskc.com // @connect mynep.com // @connect sinotrans.com // @connect educoder.net // @connect eduwest.com // @connect 345u.net // @connect sclecb.cn // @connect jctnb.org.cn // @connect kuxiao.cn // @connect hsd-es.com // @connect caq.org.cn // @connect nwpu.edu.cn // @connect zhixueyun.com // @connect twt.edu.cn // @connect htsdedu.com // @connect zhongancloud.com // @connect taoke.com // @connect wuxiantiaozhan.com // @connect qutjxjy.cn // @connect yidiankai.net // @connect ncu.edu.cn // @connect gdhkmooc.com // @connect mxdxedu.com // @connect 21tb.com // @connect haoyisheng.com // @connect tencentcs.com // @connect jijiaox.com // @connect czpx.cn // @connect ntu.edu.cn // @connect zsbxx.cn // @connect xjcde.com // @connect e-megasafe.com // @connect 5any.com // @connect euibe.com // @connect whxunw.com // @connect geron-e.com // @connect gsjtpxzx.com // @connect zygbxxpt.com // @connect ibotok.com // @connect qhce.gov.cn // @connect pintia.cn // @connect jsut.edu.cn // @connect bjou.edu.cn // @connect gdsf.gov.cn // @connect qztc.edu.cn // @connect jiangnan.edu.cn // @connect wencaischool.net // @connect ctce.com.cn:8081 // @connect wjx.cn // @connect pbcexam.cn // @connect chnenergy.com.cn // @connect ynou.edu.cn // @connect mwr.gov.cn // @connect safecn.top // @connect yiban.cn // @connect bspapp.com // @connect qust.edu.cn // @connect lut.edu.cn // @connect whcp.edu.cn // @connect chinamobile.com // @connect whcp.edu.cn // @connect swufe-online.com // @connect gaoxiaokaoshi.com // @connect gdcxxy.net // @connect dyhgp.com.cn // @connect yunxuetang.cn // @connect oberyun.com // @connect wsglw.net // @connect zaixian100f.com // @connect njupt.edu.cn // @connect neuedu.com // @connect mynj.cn // @connect zikao.com.cn // @connect swpu.edu.cn // @connect nbut.edu.cn // @connect jmu.edu.cn // @connect ouchn.edu.cn // @connect hnzjpx.net // @connect 21train.cn // @connect ccccltd.cn // @connect faxuanyun.com // @connect ah.cn // @connect tk.icu // @connect ketangpai.com // @connect keyonedu.com // @connect stdu.edu.cn // @connect cloudwis.tech // @connect gdedu.gov.cn // @connect mianyang.cn // @connect ahhjsoft.com // @connect juchiedu.com // @connect jtzyzg.org.cn // @connect lyunedu.com // @connect rdyc.cn // @connect ynau.edu.cn // @connect xuexi.cn // @connect zzu.edu.cn // @connect mystuff.com.cn // @connect treewises.com // @connect hotmatrix.cn // @connect uu-ka.cn // @connect dbask.net // @connect thsk.me // @connect gochati.cn // @connect repl.co // @connect lemtk.xyz // @connect 985211.life // @connect jsdelivr.net // @connect cdnjs.net // @connect upai.com // @connect 121.37.181.234 // @connect 134.175.72.16 // @connect 119.6.233.156 // @connect 49.232.135.103 // @connect 121.4.44.3 // @connect 101.200.60.10 // @connect 173.82.206.140 // @connect 106.13.194.221 // @connect 101.35.141.127 // @connect 119.45.63.245 // @connect 101.42.4.139 // @connect 123.249.44.94 // @connect 163.197.213.153 // @connect 20.222.22.93 // @connect 8.217.54.192 // @connect 121.43.35.12 // @connect 154.204.178.24 // @connect 142.171.5.216 // @connect 154.12.17.67 // @connect 120.55.15.168 // @connect 82.157.148.227 // @connect 8.130.121.197 // @connect 119.91.102.43 // @connect 39.105.36.225 // @connect 124.71.235.46 // @connect 13.91.97.210 // @connect 43.138.153.244 // @connect 122.114.171.124 // @connect 43.143.181.158 // @connect 47.108.112.179 // @connect 154.40.42.63 // @connect 39.105.186.109 // @connect 14.29.190.187 // @connect mcsever.xyz // @connect tcloudbaseapp.com // @connect ylnu.edu.cn // @connect yuyuetiku.com // @connect pearktrue.cn // @connect ynny.cn // @connect zjlll.net // @connect lovezhc.cn // @connect localhost // @connect gyrs.xyz // @connect gyrs.top // @connect qq.com // @connect 51aidian.com // @connect 611qk.com // @connect zxtiku.com // @connect you-yun.com.cn // @connect yktong.net // @connect nmgdj.gov.cn // @connect toujianyun.com // @connect gxpf.cn // @connect 51xinwei.com // @connect ibodao.com // @connect szou.edu.cn // @connect yncjxy.com // @connect moycp.com // @connect htexam.com // @connect alicdn.com // @connect staticfile.net // @connect zxx.edu.cn // @connect eduyun.cn // @connect rzcwl.com // @connect 101.com // @connect zjtvu.edu.cn // @connect hnust.edu.cn // @connect hnsyu.net // @connect zut.edu.cn // @connect hfut.edu.cn // @connect xust.edu.cn // @connect xueyinonline.com // @connect cqrspx.cn // @connect cugbonline.cn // @connect xynu.edu.cn // @connect neauce.com // @connect ecnusole.com // @connect xinyingzao.cn // @connect w-ling.cn // @connect aust.edu.cn // @connect ahmooc.cn // @connect pinganmeiyu.com // @connect bjxtwlkj.com // @connect finedu.com.cn // @connect cdcas.com // @connect gyrs.online // @connect tiku.me // @connect 808860.xyz // @connect repl.co // @connect ioscx.com // @connect 127.0.0.1 // @connect * // @antifeature payment // @antifeature referral-link // @license MIT // ==/UserScript== if(typeof GM_xmlhttpRequest=='undefined'){ console.log(GM_info.scriptHandler=='Greasemonkey') alert("由于兼容性问题,FCQ脚本不支持【油猴子(Greasemonkey)】插件使用,请使用【油猴/篡改猴(tampermonkey)】插件或【脚本猫(scriptcat)】插件安装此脚本,如果反复提示此信息,请从油猴子从删除此脚本") return ; } var ready_main=()=>{ var qq_group="572297706" unsafeWindow.$_=$ if (window.location.href.indexOf("https://service.icourses.cn/") != -1) { const config = { pdf_time: 20 * 60 * 1000//30分鐘 } let ChapterList = [] function GetRessList(id) { return new Promise((resolve, reject) => { GM_xmlhttpRequest({ url: "https://service.icourses.cn/hep-company//sword/company/getRess", method: "POST", data: "sectionId=" + id, headers: { "Content-type": "application/x-www-form-urlencoded; charset=UTF-8" }, onload: function (xhr) { try { resolve(JSON.parse(xhr.responseText).model.listRes) } catch (err) { resolve([]) } } }); }) } function OpenOriginDialog(Content) { return new Promise((resolve, reject) => { unsafeWindow.require(["Play"], function (Play) { let courseId = unsafeWindow._courseId; let userId = unsafeWindow._userId; let companyCode = unsafeWindow._companyCode; const ListenMessage = (e) => { if (e.data === 'lhd_close') { unsafeWindow.removeEventListener('message', ListenMessage) document.querySelector('[id^=dialog-myModal]')?.remove() resolve() } } unsafeWindow.addEventListener('message', ListenMessage); Play.dialog({ //唯一ID id: "videoBox-link", data: { url: Content.fullResUrl, companyCode: companyCode,//三方公司id resId: Content.id, type: Content.mediaType, userId: userId, courseId: courseId, title: Content.title + '' }, //弹出框宽度 width: "auto", //弹出框高度 height: (screen.availHeight - 200) + "px", //是否开启打点功能 isTicker: true }); }) }) } async function ExecteContentMission(Contet) { return new Promise(async (resolve, reject) => { await OpenOriginDialog(Contet) //执行相关内容 resolve() }) } async function AutoExecteChaprterMission(ChapterList) { for (let index = 0; index < ChapterList.length; index++) { let CurrentChapert = ChapterList[index]//获取每个章 let ContentList = await GetRessList(CurrentChapert)//获取该章数据 for (let ContentIndex = 0; ContentIndex < ContentList.length; ContentIndex++) { let CurrentContent = ContentList[ContentIndex]//遍历内容数据列表 await ExecteContentMission(CurrentContent)//执行内容 } } } function InjectButtonToBody() { let btn = document.createElement("div"); btn.innerHTML = ''; btn.onclick = function () { ChapterList = [] ChapterList = ChapterList.concat(...document.querySelectorAll(".shareResources > .panel-group > li")) let ParentChapert = document.querySelectorAll(".shareResources > .panel-group > li:not(.noContent)") ParentChapert.forEach((item) => { ChapterList = ChapterList.concat(...item.querySelectorAll(".chapter-content [data-secid]")) }); ChapterList = ChapterList.map((item) => item.getAttribute("data-id") ?? item.getAttribute("data-secid")) AutoExecteChaprterMission(ChapterList) } document.body.append(btn); } function InjectVideoPage() { unsafeWindow.savevideojs = undefined Object.defineProperty(unsafeWindow, 'videojs', { get() { let result = unsafeWindow.savevideojs; return result }, set(vdobj) { vdobj.hook('beforesetup', function (videoEl, options) { options.muted = true; options.autoplay = true; return options; }); vdobj.hook('setup', function (player) { player.on("ended", function () { }); }); unsafeWindow.savevideojs = vdobj; } }) } function InjectPdfPage() { setTimeout(() => { }, config.pdf_time) } function MainBranch() { if (location.href.indexOf('/sword/rp/play/toPlay') !== -1) { InjectVideoPage() } else if (location.href.indexOf('/icourse/lib/pdfjs/web/') !== -1) { InjectPdfPage() } else { InjectButtonToBody() } } MainBranch() } setTimeout(()=>{ if(GM_getValue('userFirst')&&window.location == window.parent.location&&!unsafeWindow.fcq_state){ GM_setValue('fingerprintDate',GM_getValue('fingerprintDate')||new Date().getTime()) if(new Date().getTime()-GM_getValue('fingerprintDate')>30*1000&&GM_getValue('fingerprintLog')&&GM_getValue('fingerprintLog')['step4']!=0){ alert('FCQ脚本出错,请加群'+qq_group+'联系bug管理员处理,修复完成后将会获得1000搜题积分奖励') } } },2000) if (window.location.href.indexOf("https://hzzh.chsi.com.cn/kc/xx/") != -1) { let rate = 2;//倍速 unsafeWindow.onload = function () { //在元素都加载完成后再监听video的播放时间,再进行倍速设置 unsafeWindow.document.querySelector('video').onplay = function () { unsafeWindow.document.querySelector('video').playbackRate = rate; } let hookSetInterval = unsafeWindow.setInterval; unsafeWindow.setInterval = function (a, b) { return hookSetInterval(a, b / rate); } unsafeWindow.document.querySelector('video').volume = 0 unsafeWindow.document.querySelector('video').play() var elevideo = document.querySelector("video"); elevideo.addEventListener('ended', function () { //结束 unsafeWindow.document.querySelector('video').play() }); } } if (window.location.href.indexOf("https://training.tisco.com.cn/front/command/LessonAction") != -1) { setTimeout(() => { // Your code here... setInterval(() => { // 判断当前视频有没有刷完,刷完的话就会暂停,我们就通过左下角是否变成了暂停来进行判断 // let pauseIcon = document.querySelector('.pausecenterchhulqiaoaix').style.display; let pauseIcon = document.querySelector("div[class^='pause']").style.display; console.log(pauseIcon) // 等于none的时候左下角为暂停,没有出现的时候就为block,出现了以后我们就跳到下一节 /* 这个网站右侧列表课程表当前播放的视频类名为cur_li,我们通过这个来判断,播放完成以后就播放它的下一个视频 */ if (pauseIcon == 'none') { // 直接拿到下一个视频的跳转连接 let nextHref = document.querySelector('.cur_li').nextElementSibling.children[0].href window.location.href = nextHref; } }, 3000) }, 5000) } if (window.location.href.indexOf("https://jiangxi.zhipeizaixian.com/study/") != -1) { var facejgt = true; var dtime = a_time / 5; window.setInterval(() => { let autonext = document.querySelector(".modal_mark___2vwrm"); let autoPlay = document.querySelector(".prism-big-play-btn"); let autoverify = document.querySelector(".ant-modal-confirm-btns"); let verifyhint = document.querySelector(".ant-modal-wrap"); let Playbutton = document.querySelector("#J_prismPlayer>video"); if (autonext != null) { setTimeout(function () { document.querySelector('.next_button___YGZWZ').click(); }, 2000); notifyhint('自动跳转', '已自动跳转下一节'); } if (autoPlay.style.display == 'block') { document.querySelector('.outter').click(); if (a_mute) { Playbutton.volume = 0; } } if (verifyhint != null) { if (autoverify == null) { if (facejgt) { notifyhint('人脸识别', '出来人脸识别啦!'); facejgt = false; } } } if (autoverify != null) { setTimeout(function () { document.querySelector('.ant-btn').click(); notifyhint('弹框验证', '已经继续观看'); }, 2000); } if (dtime <= 0) { dtime = a_time / 5; facejgt = true; } dtime--; }, 5000); notifyhint("启动成功", "已成功导入"); } GM_addValueChangeListener("reload", (name, oldValue, newValue) => { ready_main() }) let alllearning; let nolearning = []; let ns_player; let dbg = true; // 上一页 function ns_pageback() { history.back(-1); } // 获取所有课程 function ns_nostudy() { alllearning = $(".learning-activity"); for (let i = 0; i < alllearning.length; i++) { let str = $(".learning-activity:eq(" + i + ") div.activity-operations-container .completeness").attr("tipsy-literal"); let zf = str.match(/^(\W+)<\/b>/)[1]; let type = str.match(/^\W+<\/b><\/br>(\W+)/)[1]; let typeEum = -1; if (type === "完成指标:查看页面") { typeEum = 1; } else if (type.indexOf("完成指标:需累积观看") > -1) { typeEum = 2; } else if (type.indexOf("访问线上链接") > -1) { typeEum = 3; } else if (type.indexOf("完成指标:参与发帖或回帖") > -1) { typeEum = 4; } else if (type.indexOf("完成指标:观看或下载所有参考资料附件") > -1) { typeEum = 5; } if (zf !== "已完成" && typeEum != -1) { $(".learning-activity:eq(" + i + ")>div").click(); break; // nolearning.push({ // type: typeEum, // id:$(".learning-activity:eq("+i+")").attr("id").replace("learning-activity-",""), // jq:$(".learning-activity:eq("+i+")") // }) } } } function ns_back(nb) { setTimeout(function () { ns_pageback(); }, nb ? nb : 5000); } //FCQ官网以及备用 var FCQList=[ "https://tcb-w644nfbyxrttaih-2cpr71dbf4b7-1304481250.tcloudbaseapp.com/#/?orgin=greasyfork", "https://tcb-6773aty6sx2icze-7cwy98013fe9-1304481250.tcloudbaseapp.com/#/?orgin=greasyfork", "http://121.43.35.12/#/?orgin=greasyfork", ] var delay = (time) => new Promise(resolve => { setTimeout(() => { resolve() }, time) }) var GM_req3 = (req_body) => { return new Promise((resolve, reject) => { setTimeout(()=>{ reject() },10000) req_body.headers={ 'Accept': 'text/javascript, application/javascript, application/ecmascript, application/x-ecmascript, */*; q=0.01', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36', } req_body.onload=res=>{ resolve(res) } req_body.onerror=res=>{ reject() } GM_xmlhttpRequest(req_body) }) } var FCQIndex=GM_getValue('FCQIndex') var FCQ=FCQList[FCQIndex||0] var openFCQ=async ()=>{ var prefix=await Promise.race(FCQList.map(async (url,i)=>{ try{ var res=await GM_req3({url}) if((res.response||"").indexOf('meteor-web')!=-1){ return url } }catch(e){ } await delay(10000) return "" })) if(!prefix){ alert('无法打开官网,请加qq群:'+qq_group+"联系管理员处理") }else{ window.open(prefix) } } var checkIndex=async ()=>{ var FCQIndex=GM_getValue('FCQIndex') if(FCQIndex==undefined){ var index=await Promise.race(FCQList.slice(0,2).map(async (url,i)=>{ try{ var res=await GM_req3({url:url}) if((res.response||"").indexOf('meteor-web')!=-1){ return i } }catch(e){ } return -1 })) if(index!=-1){ FCQIndex=index }else{ FCQIndex=2 } } GM_setValue('FCQIndex',FCQIndex) FCQ=FCQList[FCQIndex] } checkIndex() var ns_pl = false; ; (function (_this) { function opeationUi(menu) { this.fcq_xm_answer = null; this.$ = $; this.menu = menu; this.xm_window=window this.initMenu(); this.config = {} unsafeWindow.mainProcedure=this window.mainProcedure=this return this; } opeationUi.prototype.initData = async function () { //初始化 this.xm_ui.find("#token").val(GM_getValue("token")) } opeationUi.prototype.toLog = function (explain) { setInterval(() => { let fcq_xm_select = window.getSelection().toString(); if (fcq_xm_select) { this.xm_ui.find('#fcq_xm_search_text')[0].value = window.getSelection().toString() } }, 400) this.initData(); return this; } opeationUi.prototype.arrowMoveMenu = function (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.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 } }; opeationUi.prototype.initMenu = function () { let $ = this.$, menu = this.menu; var element = $('
')[0] this.element=element var shadow = element.attachShadow({ mode: 'closed' }); this.xm_ui =$('
') unsafeWindow.fcq_search=true const styleTag = ` `; $(styleTag).appendTo(this.xm_ui); let $menu = $( `
FCQ网课助手
token:
获取(官网)
题目 :
使用前请先获取登录token后填入,选中文字点击搜索即可,更多功能请前往官网查阅,图标可拖动

`); var mask=$(`