FCQ网课通助手[全网题库][通用智能适配答题][刷课]

支持【超星学习通】【智慧树】【职教云系列】【雨课堂】【考试星】【168网校】【u校园】【大学MOOC】【云班课】【优慕课】【继续教育类】【绎通云课堂】【九江系列】【柠檬文才】【亿学宝云】【优课学堂】【小鹅通】【安徽继续教育】 【上海开放大学】 【华侨大学自考网络助学平台】【良师在线】【和学在线】【人卫慕课】【国家开放大学】【山财培训网(继续教育)】【浙江省高等学校在线开放课程共享平台】【国地质大学远程与继续教育学院】【重庆大学网络教育学院】【浙江省高等教育自学考试网络助学平台】【湖南高等学历继续教育】【优学院】【学起系列】【青书学堂】【学堂在线】【英华学堂】【广开网络教学平台】等平台的测验考试,内置题库,如有疑问或无法使用加群:399697149 咨询

目前为 2024-11-11 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name FCQ网课通助手[全网题库][通用智能适配答题][刷课]
  3. // @namespace http://tampermonkey6.net
  4. // @version 1.0.47
  5. // @description 支持【超星学习通】【智慧树】【职教云系列】【雨课堂】【考试星】【168网校】【u校园】【大学MOOC】【云班课】【优慕课】【继续教育类】【绎通云课堂】【九江系列】【柠檬文才】【亿学宝云】【优课学堂】【小鹅通】【安徽继续教育】 【上海开放大学】 【华侨大学自考网络助学平台】【良师在线】【和学在线】【人卫慕课】【国家开放大学】【山财培训网(继续教育)】【浙江省高等学校在线开放课程共享平台】【国地质大学远程与继续教育学院】【重庆大学网络教育学院】【浙江省高等教育自学考试网络助学平台】【湖南高等学历继续教育】【优学院】【学起系列】【青书学堂】【学堂在线】【英华学堂】【广开网络教学平台】等平台的测验考试,内置题库,如有疑问或无法使用加群:399697149 咨询
  6. // @author button2
  7. // @match *://*/*
  8. // @run-at document-start
  9. // @resource Table https://www.forestpolice.org/ttf/2.0/table.json
  10. // @require https://lib.baomitu.com/promise-polyfill/8.3.0/polyfill.min.js
  11. // @require https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/jquery/3.6.0/jquery.min.js
  12. // @require https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js
  13. // @require https://lib.baomitu.com/jquery/3.6.0/jquery.min.js
  14. // @require https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/fingerprintjs2/2.1.4/fingerprint2.min.js
  15. // @require https://cdn.jsdelivr.net/npm/fingerprintjs2@2.1.4/dist/fingerprint2.min.js
  16. // @require https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/mustache.js/0.1/mustache.min.js
  17. // @require https://cdn.jsdelivr.net/npm/crypto-js@4.1.1/crypto-js.min.js
  18. // @require https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/crypto-js/4.1.1/crypto-js.min.js
  19. // @grant GM_xmlhttpRequest
  20. // @grant GM_addStyle
  21. // @grant GM_getValue
  22. // @grant GM_setValue
  23. // @grant GM_listValues
  24. // @grant GM_deleteValue
  25. // @grant GM_getResourceText
  26. // @grant GM_getResourceURL
  27. // @grant GM_addValueChangeListener
  28. // @grant GM_removeValueChangeListener
  29. // @grant GM_openInTab
  30. // @grant GM_getTab
  31. // @grant GM_saveTab
  32. // @grant GM_getTabs
  33. // @grant GM_registerMenuCommand
  34. // @grant GM_unregisterMenuCommand
  35. // @grant GM_setClipboard
  36. // @grant GM_notification
  37. // @grant GM_webRequest
  38. // @grant GM_addElement
  39. // @grant GM_download
  40. // @grant GM_log
  41. // @grant GM_info
  42. // @connect gitee.com
  43. // @connect cdn.staticfile.org
  44. // @connect cdnjs.cloudflare.com
  45. // @connect cdn.bootcss.com
  46. // @connect cdn.bootcdn.net
  47. // @connect cdn.staticfile.org
  48. // @connect unpkg.com
  49. // @connect www.e-campus.top
  50. // @connect www.ncoa.org.cn
  51. // @connect bytecdntp.com
  52. // @connect icve.com.cn
  53. // @connect icodef.com
  54. // @connect muketool.com
  55. // @connect ouchn.cn
  56. // @connect xuetangx.com
  57. // @connect yuketang.cn
  58. // @connect jpush.cn
  59. // @connect unipus.cn
  60. // @connect www.kinglinkcrusher.com
  61. // @connect gf.qytechs.cn
  62. // @connect smartedu.cn
  63. // @connect zhihuishu.com
  64. // @connect chaoxing.com
  65. // @connect gaoxiaobang.com
  66. // @connect njcedu.com
  67. // @connect jsou.cn
  68. // @connect ulearning.cn
  69. // @connect kaoshixing.com
  70. // @connect gaoxiaobang.com
  71. // @connect open.com.cn
  72. // @connect sflep.com
  73. // @connect teacher.com.cn
  74. // @connect chinaedu.net
  75. // @connect sccchina.net
  76. // @connect netinnet.cn
  77. // @connect learnin.com.cn
  78. // @connect ct-edu.com.cn
  79. // @connect ismartlearning.cn
  80. // @connect youshiyun.com.cn
  81. // @connect qdjxjy.com.cn
  82. // @connect icourse163.org
  83. // @connect toyaml.com
  84. // @connect webtrn.cn
  85. // @connect gxmzu.edu.cn
  86. // @connect courshare.cn
  87. // @connect haipan.net
  88. // @connect xiguashuwang.com
  89. // @connect jiaoyu139.com
  90. // @connect ahjxjy.cn
  91. // @connect qingshuxuetang.com
  92. // @connect 168wangxiao.com
  93. // @connect xiaoe-tech.com
  94. // @connect shou.org.cn
  95. // @connect edu-xl.com
  96. // @connect hexuezx.cn
  97. // @connect pmphmooc.com
  98. // @connect lyck6.cn
  99. // @connect yinghuaonline.com
  100. // @connect forchange.cn
  101. // @connect tencent.com
  102. // @connect chatforai.cc
  103. // @connect aigcfun.com
  104. // @connect theb.ai
  105. // @connect binjie.site
  106. // @connect xgp.one
  107. // @connect luntianxia.uk
  108. // @connect 51buygpt.com
  109. // @connect extkj.cn
  110. // @connect xjai.cc
  111. // @connect xjai.pro
  112. // @connect zw7.lol
  113. // @connect xeasy.me
  114. // @connect aifree.site
  115. // @connect wuguokai.top
  116. // @connect aidutu.cn
  117. // @connect leiluan.cc
  118. // @connect gptservice.xyz
  119. // @connect gpt66.cn
  120. // @connect ai.ls
  121. // @connect letsearches.com
  122. // @connect powerchat.top
  123. // @connect wobcw.com
  124. // @connect 68686.ltd
  125. // @connect t66.ltd
  126. // @connect t-chat.cn
  127. // @connect aitianhu.com
  128. // @connect anzz.top
  129. // @connect ohtoai.com
  130. // @connect freeopenai.xyz
  131. // @connect supremes.pro
  132. // @connect bnu120.space
  133. // @connect free-chat.asia
  134. // @connect aifks001.online
  135. // @connect a0.chat
  136. // @connect usesless.com
  137. // @connect ftcl.store
  138. // @connect sunls.me
  139. // @connect pizzagpt.it
  140. // @connect phind.com
  141. // @connect bushiai.com
  142. // @connect qdymys.cn
  143. // @connect pp2pdf.com
  144. // @connect aichatos.cloud
  145. // @connect fakeopen.com
  146. // @connect wuguokai.cn
  147. // @connect gtpcleandx.xyz
  148. // @connect esojourn.org
  149. // @connect cveoy.top
  150. // @connect chatcleand.xyz
  151. // @connect 154.40.59.105
  152. // @connect gptplus.one
  153. // @connect xcbl.cc
  154. // @connect hz-it-dev.com
  155. // @connect 6bbs.cn
  156. // @connect 38.47.97.76
  157. // @connect lbb.ai
  158. // @connect lovebaby.today
  159. // @connect gamejx.cn
  160. // @connect chat86.cn
  161. // @connect ai001.live
  162. // @connect ai003.live
  163. // @connect ai006.live
  164. // @connect promptboom.com
  165. // @connect hehanwang.com
  166. // @connect caipacity.com
  167. // @connect chatzhang.top
  168. // @connect 51mskd.com
  169. // @connect forwardminded.xyz
  170. // @connect 1chat.cc
  171. // @connect minimax.chat
  172. // @connect cytsee.com
  173. // @connect skybyte.me
  174. // @connect alllinkai1.com
  175. // @connect baidu.com
  176. // @connect geekr.dev
  177. // @connect chatgptdddd.com
  178. // @connect anfans.cn
  179. // @connect bing.com
  180. // @connect openai.com
  181. // @connect aliyun.com
  182. // @connect ai-yuxin.space
  183. // @connect yuxin-ai.com
  184. // @connect xfyun.cn
  185. // @connect geetest.com
  186. // @connect tiangong.cn
  187. // @connect yeyu1024.xyz
  188. // @connect chatglm.cn
  189. // @connect bigmodel.cn
  190. // @connect gptgo.ai
  191. // @connect 360.cn
  192. // @connect mixerbox.com
  193. // @connect ohmygpt.com
  194. // @connect muspimerol.site
  195. // @connect frechat.xyz
  196. // @connect youdao.com
  197. // @connect youkexuetang.cn
  198. // @connect cx-online.net
  199. // @connect sxmaps.com
  200. // @connect eswonline.com
  201. // @connect ketangx.net
  202. // @connect weirenzheng.cn
  203. // @connect cqooc.com
  204. // @connect edu-edu.com.cn
  205. // @connect fjnu.cn
  206. // @connect yxbyun.com
  207. // @connect kaoshixing.com
  208. // @connect beeouc.com
  209. // @connect edu-edu.com
  210. // @connect bossyun.com
  211. // @connect reseayun.com
  212. // @connect sww.com.cn
  213. // @connect jinkex.com
  214. // @connect zikaoj.com
  215. // @connect ls365.net
  216. // @connect ls365.com
  217. // @connect 91huayi.com
  218. // @connect shandong-energy.com
  219. // @connect ttcdw.cn
  220. // @connect wjx.top
  221. // @connect coursera.org
  222. // @connect ahjxjy.cn
  223. // @connect hbcjpt.com
  224. // @connect whu.edu.cn
  225. // @connect xjyxjyw.com
  226. // @connect yxlearning.com
  227. // @connect aqscpx.com
  228. // @connect dayoo.com
  229. // @connect ncme.org.cn
  230. // @connect tikuhai.com
  231. // @connect enncy.cn
  232. // @connect ocsjs.com
  233. // @connect mhtall.com
  234. // @connect ustcyun.cn
  235. // @connect 0991xl.com
  236. // @connect hbysw.org
  237. // @connect cj-edu.com
  238. // @connect gzbjyzjxjy.cn
  239. // @connect superchutou.com
  240. // @connect zaixiankaoshi.com
  241. // @connect ynjspx.cn
  242. // @connect zhifa315.com
  243. // @connect jxjypt.cn
  244. // @connect hnzkw.org.cn
  245. // @connect wentaionline.com
  246. // @connect chinahrt.com
  247. // @connect ha.cn
  248. // @connect tv168.cn
  249. // @connect 59iedu.com
  250. // @connect cdeledu.com
  251. // @connect cncecyy.com
  252. // @connect jste.net.cn
  253. // @connect ls365.net
  254. // @connect brjxjy.com
  255. // @connect dyhrsc.cn
  256. // @connect vmserver.cn
  257. // @connect qdu.edu.cn
  258. // @connect xidian.edu.cn
  259. // @connect swust.net.cn
  260. // @connect ggcjxjy.cn
  261. // @connect hebyunedu.com
  262. // @connect ncu.edu.cn
  263. // @connect jijiaool.com
  264. // @connect zikaosw.cn
  265. // @connect cmechina.net
  266. // @connect ewt360.com
  267. // @connect qlteacher.com
  268. // @connect mxdxedu.com
  269. // @connect ityxb.com
  270. // @connect uooc.net.cn
  271. // @connect scxfks.com
  272. // @connect tsinghuaelt.com
  273. // @connect enaea.edu.cn
  274. // @connect gzsrs.cn
  275. // @connect yanxiu.com
  276. // @connect zxhnzq.com
  277. // @connect chinaacc.com
  278. // @connect ncet.edu.cn
  279. // @connect tcmjy.org
  280. // @connect baidu.com
  281. // @connect xidian.edu.cn
  282. // @connect whut.edu.cn
  283. // @connect yooc.me
  284. // @connect cj-edu.com
  285. // @connect cncecyy.com
  286. // @connect cjnep.net
  287. // @connect zikao365.com
  288. // @connect enetedu.com
  289. // @connect xueyinonline.com
  290. // @connect kepeiol.com
  291. // @connect brjxjy.com
  292. // @connect ketangx.net
  293. // @connect chinamde.cn
  294. // @connect examcoo.com
  295. // @connect 345u.net
  296. // @connect zgzjzj.com
  297. // @connect twt.edu.cn
  298. // @connect jctnb.org.cn
  299. // @connect 21tb.com
  300. // @connect zj.gov.cn
  301. // @connect zikaosw.cn
  302. // @connect spicti.com
  303. // @connect haoyisheng.com
  304. // @connect enaea.edu.cn
  305. // @connect gzsrs.cn
  306. // @connect yanxiu.com
  307. // @connect ncet.edu.cn
  308. // @connect chinahrt.com
  309. // @connect zxhnzq.com
  310. // @connect ghlearning.com
  311. // @connect qlu.edu.cn
  312. // @connect baidu.com
  313. // @connect hii.cn
  314. // @connect hustsnde.com
  315. // @connect zgzjzj.com
  316. // @connect peishenjy.com
  317. // @connect axetk.cn
  318. // @connect ipmph.com
  319. // @connect hnscen.cn
  320. // @connect coursera.cn
  321. // @connect udemy.cn
  322. // @connect edx.cn
  323. // @connect wutp.com
  324. // @connect imu.edu.cn
  325. // @connect mhys.com.cn
  326. // @connect cumt.edu.cn
  327. // @connect scit-edu.cn
  328. // @connect smartchutou.com
  329. // @connect anpeiwang.com
  330. // @connect gdut.edu.cn
  331. // @connect dwzpzx.com
  332. // @connect gzucm.edu.cn
  333. // @connect jxuas.edu.cn
  334. // @connect 51sunshining.com
  335. // @connect hzau.edu.cn
  336. // @connect tisco.com.cn
  337. // @connect myunedu.com
  338. // @connect snnu.edu.cn
  339. // @connect hiaskc.com
  340. // @connect mynep.com
  341. // @connect sinotrans.com
  342. // @connect educoder.net
  343. // @connect eduwest.com
  344. // @connect 345u.net
  345. // @connect sclecb.cn
  346. // @connect jctnb.org.cn
  347. // @connect kuxiao.cn
  348. // @connect hsd-es.com
  349. // @connect caq.org.cn
  350. // @connect nwpu.edu.cn
  351. // @connect zhixueyun.com
  352. // @connect twt.edu.cn
  353. // @connect htsdedu.com
  354. // @connect zhongancloud.com
  355. // @connect taoke.com
  356. // @connect wuxiantiaozhan.com
  357. // @connect qutjxjy.cn
  358. // @connect yidiankai.net
  359. // @connect ncu.edu.cn
  360. // @connect gdhkmooc.com
  361. // @connect mxdxedu.com
  362. // @connect 21tb.com
  363. // @connect haoyisheng.com
  364. // @connect tencentcs.com
  365. // @connect jijiaox.com
  366. // @connect czpx.cn
  367. // @connect ntu.edu.cn
  368. // @connect zsbxx.cn
  369. // @connect xjcde.com
  370. // @connect e-megasafe.com
  371. // @connect 5any.com
  372. // @connect euibe.com
  373. // @connect whxunw.com
  374. // @connect geron-e.com
  375. // @connect gsjtpxzx.com
  376. // @connect zygbxxpt.com
  377. // @connect ibotok.com
  378. // @connect qhce.gov.cn
  379. // @connect pintia.cn
  380. // @connect jsut.edu.cn
  381. // @connect bjou.edu.cn
  382. // @connect gdsf.gov.cn
  383. // @connect qztc.edu.cn
  384. // @connect jiangnan.edu.cn
  385. // @connect wencaischool.net
  386. // @connect ctce.com.cn:8081
  387. // @connect wjx.cn
  388. // @connect pbcexam.cn
  389. // @connect chnenergy.com.cn
  390. // @connect ynou.edu.cn
  391. // @connect mwr.gov.cn
  392. // @connect safecn.top
  393. // @connect yiban.cn
  394. // @connect bspapp.com
  395. // @connect qust.edu.cn
  396. // @connect lut.edu.cn
  397. // @connect whcp.edu.cn
  398. // @connect chinamobile.com
  399. // @connect whcp.edu.cn
  400. // @connect swufe-online.com
  401. // @connect gaoxiaokaoshi.com
  402. // @connect gdcxxy.net
  403. // @connect dyhgp.com.cn
  404. // @connect yunxuetang.cn
  405. // @connect oberyun.com
  406. // @connect wsglw.net
  407. // @connect zaixian100f.com
  408. // @connect njupt.edu.cn
  409. // @connect neuedu.com
  410. // @connect mynj.cn
  411. // @connect zikao.com.cn
  412. // @connect swpu.edu.cn
  413. // @connect nbut.edu.cn
  414. // @connect jmu.edu.cn
  415. // @connect ouchn.edu.cn
  416. // @connect hnzjpx.net
  417. // @connect 21train.cn
  418. // @connect ccccltd.cn
  419. // @connect faxuanyun.com
  420. // @connect ah.cn
  421. // @connect tk.icu
  422. // @connect ketangpai.com
  423. // @connect keyonedu.com
  424. // @connect stdu.edu.cn
  425. // @connect cloudwis.tech
  426. // @connect gdedu.gov.cn
  427. // @connect mianyang.cn
  428. // @connect ahhjsoft.com
  429. // @connect juchiedu.com
  430. // @connect jtzyzg.org.cn
  431. // @connect lyunedu.com
  432. // @connect rdyc.cn
  433. // @connect ynau.edu.cn
  434. // @connect xuexi.cn
  435. // @connect zzu.edu.cn
  436. // @connect mystuff.com.cn
  437. // @connect treewises.com
  438. // @connect hotmatrix.cn
  439. // @connect uu-ka.cn
  440. // @connect dbask.net
  441. // @connect thsk.me
  442. // @connect gochati.cn
  443. // @connect repl.co
  444. // @connect lemtk.xyz
  445. // @connect 985211.life
  446. // @connect jsdelivr.net
  447. // @connect cdnjs.net
  448. // @connect upai.com
  449. // @connect 121.37.181.234
  450. // @connect 134.175.72.16
  451. // @connect 119.6.233.156
  452. // @connect 49.232.135.103
  453. // @connect 121.4.44.3
  454. // @connect 101.200.60.10
  455. // @connect 173.82.206.140
  456. // @connect 106.13.194.221
  457. // @connect 101.35.141.127
  458. // @connect 119.45.63.245
  459. // @connect 101.42.4.139
  460. // @connect 123.249.44.94
  461. // @connect 163.197.213.153
  462. // @connect 20.222.22.93
  463. // @connect 8.217.54.192
  464. // @connect 121.43.35.12
  465. // @connect 154.204.178.24
  466. // @connect 142.171.5.216
  467. // @connect 154.12.17.67
  468. // @connect 120.55.15.168
  469. // @connect 82.157.148.227
  470. // @connect 8.130.121.197
  471. // @connect 119.91.102.43
  472. // @connect 39.105.36.225
  473. // @connect 124.71.235.46
  474. // @connect 13.91.97.210
  475. // @connect 43.138.153.244
  476. // @connect 122.114.171.124
  477. // @connect 43.143.181.158
  478. // @connect 47.108.112.179
  479. // @connect 154.40.42.63
  480. // @connect 39.105.186.109
  481. // @connect 14.29.190.187
  482. // @connect 118.195.130.244
  483. // @connect 62.234.36.191
  484. // @connect 150.138.77.237
  485. // @connect 47.121.140.50
  486. // @connect 156.236.117.109
  487. // @connect 121.36.70.254
  488. // @connect 49.235.150.29
  489. // @connect 82.157.105.20
  490. // @connect 39.105.186.109
  491. // @connect mcsever.xyz
  492. // @connect tcloudbaseapp.com
  493. // @connect ylnu.edu.cn
  494. // @connect yuyuetiku.com
  495. // @connect pearktrue.cn
  496. // @connect ynny.cn
  497. // @connect zjlll.net
  498. // @connect lovezhc.cn
  499. // @connect localhost
  500. // @connect gyrs.xyz
  501. // @connect gyrs.top
  502. // @connect qq.com
  503. // @connect 51aidian.com
  504. // @connect 611qk.com
  505. // @connect zxtiku.com
  506. // @connect you-yun.com.cn
  507. // @connect yktong.net
  508. // @connect nmgdj.gov.cn
  509. // @connect toujianyun.com
  510. // @connect gxpf.cn
  511. // @connect 51xinwei.com
  512. // @connect ibodao.com
  513. // @connect szou.edu.cn
  514. // @connect yncjxy.com
  515. // @connect moycp.com
  516. // @connect htexam.com
  517. // @connect alicdn.com
  518. // @connect staticfile.net
  519. // @connect zxx.edu.cn
  520. // @connect eduyun.cn
  521. // @connect rzcwl.com
  522. // @connect 101.com
  523. // @connect zjtvu.edu.cn
  524. // @connect hnust.edu.cn
  525. // @connect hnsyu.net
  526. // @connect zut.edu.cn
  527. // @connect hfut.edu.cn
  528. // @connect xust.edu.cn
  529. // @connect xueyinonline.com
  530. // @connect cqrspx.cn
  531. // @connect cugbonline.cn
  532. // @connect xynu.edu.cn
  533. // @connect neauce.com
  534. // @connect ecnusole.com
  535. // @connect xinyingzao.cn
  536. // @connect w-ling.cn
  537. // @connect aust.edu.cn
  538. // @connect ahmooc.cn
  539. // @connect pinganmeiyu.com
  540. // @connect bjxtwlkj.com
  541. // @connect finedu.com.cn
  542. // @connect cdcas.com
  543. // @connect gyrs.online
  544. // @connect tiku.me
  545. // @connect 808860.xyz
  546. // @connect repl.co
  547. // @connect ioscx.com
  548. // @connect ksrr.net
  549. // @connect bobo91.com
  550. // @connect promplate.dev
  551. // @connect binjie.fun
  552. // @connect gptforlove.com
  553. // @connect yeyu2048.xyz
  554. // @connect webtrncdn.com
  555. // @connect suda.edu.cn
  556. // @connect xjjwedu.com
  557. // @connect gxmzu.edu.cn
  558. // @connect cug.edu.cn
  559. // @connect cuc.edu.cn
  560. // @connect jsnu.edu.cn
  561. // @connect henu.edu.cn
  562. // @connect ahu.edu.cn
  563. // @connect smu.edu.cn
  564. // @connect nuaa.edu.cn
  565. // @connect rtjy.com.cn
  566. // @connect cqust.edu.cn
  567. // @connect bjtu.edu.cn
  568. // @connect bzpt.edu.cn
  569. // @connect gyrs.fun
  570. // @connect 91faka.com
  571. // @connect o-learn.cn
  572. // @connect lidapoly.edu.cn
  573. // @connect baichuan-ai.com
  574. // @connect chatforai.store
  575. // @connect onrender.com
  576. // @connect 168xc.top
  577. // @connect xiguashuwang.com
  578. // @connect hangzhou.gov.cn
  579. // @connect chatgpt.com
  580. // @connect gking.me
  581. // @connect aichatos8.xyz
  582. // @connect caifree.com
  583. // @connect 644566.xyz
  584. // @connect matools.com
  585. // @connect xjrsjxjy.com
  586. // @connect shqszx.com
  587. // @connect xju.edu.cn
  588. // @connect myccr.net
  589. // @connect 5zk.com.cn
  590. // @connect zjtvu.edu.cn
  591. // @connect sdsafeschool.gov.cn
  592. // @connect cqsdx.cn
  593. // @connect huashenxt.com
  594. // @connect ahut.edu.cn
  595. // @connect jsduxing.com
  596. // @connect hut.edu.cn
  597. // @connect xzit.edu.cn
  598. // @connect fjdfxy.com
  599. // @connect longzhi.net.cn
  600. // @connect jcpx-psych.com
  601. // @connect zhi-ti.com
  602. // @connect szqinqi.com
  603. // @connect chineseworkers.com.cn
  604. // @connect cfyedu.com
  605. // @connect mynj.cn
  606. // @connect zbwsrc.cn
  607. // @connect qwjiaoyu.com
  608. // @connect aitianhu1.top
  609. // @connect wwwwqq.com
  610. // @connect viaa.fun
  611. // @connect wendabao-a.top
  612. // @connect bixin123.com
  613. // @connect ai365vip.com
  614. // @connect ichuang.top
  615. // @connect ichat2019.com
  616. // @connect tinycms.xyz
  617. // @connect jaze.top
  618. // @connect chkzh.com
  619. // @connect wanjuantiku.com
  620. // @connect 611520.cn
  621. // @connect moiu.cn
  622. // @connect tttt.ee
  623. // @connect hnvist.cn
  624. // @connect mosoteach.cn
  625. // @connect 127.0.0.1
  626. // @connect *
  627. // @antifeature payment
  628. // @antifeature referral-link
  629. // @license MIT
  630. // ==/UserScript==
  631.  
  632.  
  633.  
  634. if(typeof GM_xmlhttpRequest=='undefined'||GM_info.scriptHandler=='stay'){
  635. alert("由于兼容性问题,FCQ脚本不支持【油猴子(Greasemonkey)或Stay for Browser】插件使用,请使用【篡改猴/油猴(tampermonkey)】插件或【脚本猫(scriptcat)】插件安装此脚本,安装地址:https://www.crxsoso.com/webstore/detail/dhdgffkkebhmkfjojejmpbldmpobfkfo 安装教程:https://www.youxiaohou.com/zh-cn/crx.html?spm=1717453534064 如果反复提示此信息,请从插件中删除此脚本")
  636. return ;
  637. }
  638.  
  639. setInterval(()=>{
  640. if(window.xm_ui){
  641. var content=window.xm_ui.find("#xm_share:contains(更新)").clone()
  642. window.xm_ui.find("#xm_share:contains(更新)").remove()
  643. window.xm_ui.find('#xm_state').before(content.attr("id","xm_update").click(()=>{
  644. window.open("https://gf.qytechs.cn/zh-CN/scripts/502159-fcq%E7%BD%91%E8%AF%BE%E9%80%9A%E5%8A%A9%E6%89%8B-%E5%85%A8%E7%BD%91%E9%A2%98%E5%BA%93-%E9%80%9A%E7%94%A8%E6%99%BA%E8%83%BD%E9%80%82%E9%85%8D%E7%AD%94%E9%A2%98-%E5%88%B7%E8%AF%BE")
  645. }))
  646. }
  647. },1000)
  648. var flagx=false
  649. var ready_main=()=>{
  650.  
  651.  
  652.  
  653. if(window.ggxmm){
  654. setInterval(()=>{
  655. var $=$_
  656. console.log('循环运行')
  657. if($(".el-message-box:contains(本小节学习已完成) span:contains(确定):visible").length||$('.vjs-remaining-time-display').text()=='-0:00'){
  658. $(".el-message-box:contains(本小节学习已完成) span:contains(确定):visible").click()
  659. console.log('学习完成')
  660. setTimeout(()=>{
  661. $('font:contains(播放下一节)').click()
  662. },500)
  663.  
  664. }else{
  665. $('.vjs-big-play-button').click()
  666. }
  667.  
  668. },1000)
  669. }
  670.  
  671. function gV(){
  672. return GM_getValue("oc")
  673. }
  674.  
  675. function loop(){
  676. setTimeout(()=>{
  677. if (window.self !== window.top){
  678. return;
  679. }
  680. let videoElem;
  681. videoElem = document.querySelector('#iframe').contentDocument.querySelector('iframe').contentDocument.querySelector('#video_html5_api');
  682. if (!videoElem){
  683. return;
  684. }
  685. let videoLi = document.querySelectorAll('.posCatalog_name');
  686. let videoCu = document.querySelector('.posCatalog_active span');
  687. let videoNext;
  688. for (let i=0,len=videoLi.length;i < len;i++){
  689. if (videoLi[i] == videoCu){
  690. videoNext = videoLi[i+1];
  691. break;
  692. }
  693. }
  694. function AnsQues(){
  695. let check = setInterval(()=>{
  696. try{
  697. let text = document.querySelector('iframe').contentDocument.querySelector('iframe').contentDocument.querySelector('iframe').contentDocument.querySelector('body > div:last-child').innerText;
  698. if (text.slice(0,5) === '答题已完成'){
  699. clearInterval(check);
  700. document.querySelector('iframe').contentDocument.querySelector('iframe').contentDocument.querySelector('iframe').contentDocument.querySelector('.Btn_blue_1').click()
  701. setTimeout(()=>{
  702. document.querySelector('iframe').contentDocument.querySelector('iframe').contentDocument.querySelector('iframe').contentDocument.querySelector('#confirmSubWin .bluebtn').click()
  703. setTimeout(()=>{
  704. videoNext.click();
  705. if (videoNext != videoLi[videoLi.length-1]){
  706. loop();
  707. }
  708. },2000)
  709. },50)
  710. return;
  711. }
  712. else if (text.match('题目待完善')){
  713. clearInterval(check);
  714. videoNext.click();
  715. if (videoNext != videoLi[videoLi.length-1]){
  716. loop();
  717. }
  718. return;
  719. }
  720. }
  721. catch{
  722. }
  723. },2000)
  724. }
  725. let jobLeft;
  726. try {
  727. jobLeft = document.querySelector('.posCatalog_active input').value;
  728. }
  729. catch {
  730. videoNext.click();
  731. if (videoNext != videoLi[videoLi.length-1]){
  732. loop();
  733. }
  734. return;
  735. }
  736. if (jobLeft == 2){
  737. videoElem.onended = ()=>{
  738. document.querySelector('#dct2').click();
  739. setTimeout(AnsQues,2000);
  740. }
  741. }
  742. else if (jobLeft == 1){
  743. if (!document.querySelector('#iframe').contentDocument.querySelector('.ans-job-finished')){
  744. videoElem.onended = videoNext.click();
  745. }
  746. else {
  747. document.querySelector('#dct2').click();
  748. setTimeout(AnsQues,2000);
  749. }
  750. }
  751. },5000);
  752. }
  753. function taolun(){
  754. const body = document.querySelector("body")
  755. const btn = document.createElement("button")
  756. btn.onclick = allComment
  757. btn.style.padding = "10px"
  758. btn.style.backgroundColor = "skyblue"
  759. btn.style.position = "fixed"
  760. btn.style.right = "100px"
  761. btn.style.top = "400px"
  762. btn.textContent = "一键回复"
  763. body.appendChild(btn)
  764. async function allComment() {
  765. console.log("1111")
  766. const name = document.querySelector(".zt_u_name").textContent
  767. const commentDoms = document.querySelectorAll("#showTopics .content1118 .oneDiv")
  768. for (let i = 0; i < commentDoms.length; i++) {
  769. if (commentDoms[i].innerHTML.indexOf(name) === -1) {
  770. const comment = commentDoms[i].querySelector(".hf_pct").textContent
  771. const replyBtn = commentDoms[i].querySelector(".clearfix .tl1")
  772. replyBtn.click()
  773. let textarea = commentDoms[i].querySelector(".plDiv textarea")
  774. while (!textarea) {
  775. textarea = commentDoms[i].querySelector(".plDiv textarea")
  776. }
  777. textarea.value = comment
  778. const uploadBtn = commentDoms[i].querySelector(".plDiv grenBtn")
  779. uploadBtn.click()
  780. await new Promise((re) => {
  781. setTimeout(() => { re() }, 200)
  782. })
  783. console.log(comment, replyBtn)
  784. }
  785. }
  786. }
  787.  
  788. }
  789. function dafen(){
  790. var button = document.createElement('button');
  791. button.innerHTML = '一键打分';
  792. button.style.position = 'absolute'; // 或者 'absolute' 如果您想要相对于某个容器定位
  793. button.style.top = '10px'; // 距离顶部 10px
  794. button.style.left = '50%'; // 居中
  795. button.style.zIndex = '9999';
  796. button.style.padding = '10px';
  797. button.style.backgroundColor = '#008CBA';
  798. button.style.color = 'white';
  799. button.style.border = 'none';
  800. button.style.borderRadius = '5px';
  801. button.style.cursor = 'pointer';
  802.  
  803.  
  804. document.body.appendChild(button);
  805.  
  806.  
  807.  
  808. // 点击按钮时的处理函数
  809. button.onclick = function() {
  810. // 获取所有具有 class "inputBranch makeScore" 的 input 元素
  811. const inputs = document.querySelectorAll('input.inputBranch.makeScore');
  812.  
  813. // 遍历这些 input 元素
  814. inputs.forEach(input => {
  815. // 获取 input 元素的 data 属性值
  816. const dataValue = input.getAttribute('data');
  817.  
  818. // 将 data 属性值赋给 value 属性
  819. input.value = dataValue;
  820. });
  821. //总分
  822. var fullScoreElement = document.getElementById("fullScore");
  823. // 获取id为sumScore的元素
  824. var sumScoreElement = document.getElementById("sumScore");
  825.  
  826. // 检查这两个元素是否存在
  827. if (fullScoreElement && sumScoreElement) {
  828. // 将fullScore的value值赋给sumScore的value
  829. sumScoreElement.value = fullScoreElement.value;
  830. document.querySelector('.jb_btn_92.fr.fs14.marginLeft30').click();
  831.  
  832. }
  833.  
  834.  
  835. };
  836.  
  837. }
  838.  
  839. function daochu(){
  840. // 定义一个函数来导出题目
  841. function exportQuestions() {
  842. var questions = $('.stem_con');
  843. var output = '';
  844.  
  845. questions.each(function(index) {
  846. var questionText = $(this).find('p').text().trim();
  847. var options = $(this).next('.stem_answer').find('.num_option, .answer_p');
  848. // 寻找紧接在当前题目的下一个.answerDiv作为答案部分
  849. var nextAnswerDiv = $(this).nextUntil('.stem_con').filter('.answerDiv');
  850. var answer = nextAnswerDiv.find('.answer_tit p').text().trim();
  851.  
  852. output += (index + 1) + '. ' + questionText + '\r\n';
  853. options.each(function(optionIndex) {
  854. if (optionIndex % 2 === 0) { // 选项字母
  855. var letter = $(this).text().trim();
  856. output += letter + ' ';
  857. } else { // 选项文本
  858. output += $(this).text().trim() + '\r\n';
  859. }
  860. });
  861. output += '#' + answer + '#\r\n';
  862. });
  863.  
  864. saveStringToFile("<TikS><本试卷使用TikN学习通导出工具V1.0自动生成>" + output,"导出习题.tik")
  865. }
  866.  
  867. function saveStringToFile(str, filename) {
  868. var blob = new Blob([str], {type: "text/plain;charset=utf-8"});
  869. var link = document.createElement('a');
  870. link.href = window.URL.createObjectURL(blob);
  871. link.download = filename;
  872. link.click();
  873. }
  874.  
  875. // 当页面加载完成时执行导出函数
  876. $(document).ready(exportQuestions);
  877. }
  878.  
  879. var qq_group="399697149"
  880.  
  881. unsafeWindow.$_=$
  882. if (window.location.href.indexOf("https://service.icourses.cn/") != -1) {
  883. const config = {
  884. pdf_time: 20 * 60 * 1000//30分鐘
  885. }
  886. let ChapterList = []
  887. function GetRessList(id) {
  888. return new Promise((resolve, reject) => {
  889. GM_xmlhttpRequest({
  890. url: "https://service.icourses.cn/hep-company//sword/company/getRess",
  891. method: "POST",
  892. data: "sectionId=" + id,
  893. headers: {
  894. "Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
  895. },
  896. onload: function (xhr) {
  897. try {
  898. resolve(JSON.parse(xhr.responseText).model.listRes)
  899. }
  900. catch (err) {
  901. resolve([])
  902. }
  903. }
  904. });
  905. })
  906. }
  907. function OpenOriginDialog(Content) {
  908. return new Promise((resolve, reject) => {
  909. unsafeWindow.require(["Play"], function (Play) {
  910. let courseId = unsafeWindow._courseId;
  911. let userId = unsafeWindow._userId;
  912. let companyCode = unsafeWindow._companyCode;
  913. const ListenMessage = (e) => {
  914. if (e.data === 'lhd_close') {
  915. unsafeWindow.removeEventListener('message', ListenMessage)
  916. document.querySelector('[id^=dialog-myModal]')?.remove()
  917. resolve()
  918. }
  919. }
  920. unsafeWindow.addEventListener('message', ListenMessage);
  921. Play.dialog({
  922. //唯一ID
  923. id: "videoBox-link",
  924. data: {
  925. url: Content.fullResUrl,
  926. companyCode: companyCode,//三方公司id
  927. resId: Content.id,
  928. type: Content.mediaType,
  929. userId: userId,
  930. courseId: courseId,
  931. title: Content.title + ''
  932. },
  933. //弹出框宽度
  934. width: "auto",
  935. //弹出框高度
  936. height: (screen.availHeight - 200) + "px",
  937. //是否开启打点功能
  938. isTicker: true
  939. });
  940. })
  941. })
  942. }
  943. async function ExecteContentMission(Contet) {
  944. return new Promise(async (resolve, reject) => {
  945. await OpenOriginDialog(Contet)
  946. //执行相关内容
  947. resolve()
  948. })
  949. }
  950. async function AutoExecteChaprterMission(ChapterList) {
  951. for (let index = 0; index < ChapterList.length; index++) {
  952. let CurrentChapert = ChapterList[index]//获取每个章
  953. let ContentList = await GetRessList(CurrentChapert)//获取该章数据
  954. for (let ContentIndex = 0; ContentIndex < ContentList.length; ContentIndex++) {
  955. let CurrentContent = ContentList[ContentIndex]//遍历内容数据列表
  956. await ExecteContentMission(CurrentContent)//执行内容
  957. }
  958.  
  959. }
  960. }
  961. function InjectButtonToBody() {
  962. let btn = document.createElement("div");
  963. btn.innerHTML = '<button style="position: fixed;bottom: 80vw;right: 0;z-index: 9999;height: 50px;">开始刷课</button>';
  964. btn.onclick = function () {
  965. ChapterList = []
  966. ChapterList = ChapterList.concat(...document.querySelectorAll(".shareResources > .panel-group > li"))
  967. let ParentChapert = document.querySelectorAll(".shareResources > .panel-group > li:not(.noContent)")
  968. ParentChapert.forEach((item) => {
  969. ChapterList = ChapterList.concat(...item.querySelectorAll(".chapter-content [data-secid]"))
  970. });
  971. ChapterList = ChapterList.map((item) => item.getAttribute("data-id") ?? item.getAttribute("data-secid"))
  972. AutoExecteChaprterMission(ChapterList)
  973. }
  974. document.body.append(btn);
  975. }
  976. function InjectVideoPage() {
  977. unsafeWindow.savevideojs = undefined
  978. Object.defineProperty(unsafeWindow, 'videojs', {
  979. get() {
  980. let result = unsafeWindow.savevideojs;
  981. return result
  982. },
  983. set(vdobj) {
  984. vdobj.hook('beforesetup', function (videoEl, options) {
  985. options.muted = true;
  986. options.autoplay = true;
  987. return options;
  988. });
  989. vdobj.hook('setup', function (player) {
  990. player.on("ended", function () {
  991. });
  992. });
  993. unsafeWindow.savevideojs = vdobj;
  994.  
  995. }
  996. })
  997. }
  998. function InjectPdfPage() {
  999. setTimeout(() => {
  1000. }, config.pdf_time)
  1001. }
  1002. function MainBranch() {
  1003. if (location.href.indexOf('/sword/rp/play/toPlay') !== -1) {
  1004. InjectVideoPage()
  1005. } else if (location.href.indexOf('/icourse/lib/pdfjs/web/') !== -1) {
  1006. InjectPdfPage()
  1007. } else {
  1008. InjectButtonToBody()
  1009. }
  1010. }
  1011. MainBranch()
  1012.  
  1013. }
  1014.  
  1015. setTimeout(()=>{
  1016. if(GM_getValue('userFirst')&&window.location == window.parent.location&&!unsafeWindow.fcq_state){
  1017. GM_setValue('fingerprintDate',GM_getValue('fingerprintDate')||new Date().getTime())
  1018. if(new Date().getTime()-GM_getValue('fingerprintDate')>30*1000&&GM_getValue('fingerprintLog')&&GM_getValue('fingerprintLog')['step4']!=0){
  1019. alert('FCQ脚本出错,请加群'+qq_group+'联系bug管理员处理,修复完成后将会获得1000搜题积分奖励')
  1020. }
  1021. }
  1022. },2000)
  1023.  
  1024. if (window.location.href.indexOf("https://hzzh.chsi.com.cn/kc/xx/") != -1) {
  1025. let rate = 2;//倍速
  1026. unsafeWindow.onload = function () {
  1027. //在元素都加载完成后再监听video的播放时间,再进行倍速设置
  1028. unsafeWindow.document.querySelector('video').onplay = function () {
  1029. unsafeWindow.document.querySelector('video').playbackRate = rate;
  1030. }
  1031. let hookSetInterval = unsafeWindow.setInterval;
  1032. unsafeWindow.setInterval = function (a, b) {
  1033. return hookSetInterval(a, b / rate);
  1034. }
  1035. unsafeWindow.document.querySelector('video').volume = 0
  1036. unsafeWindow.document.querySelector('video').play()
  1037. var elevideo = document.querySelector("video");
  1038. elevideo.addEventListener('ended', function () { //结束
  1039. unsafeWindow.document.querySelector('video').play()
  1040. });
  1041. }
  1042. }
  1043.  
  1044. if (window.location.href.indexOf("https://training.tisco.com.cn/front/command/LessonAction") != -1) {
  1045. setTimeout(() => {
  1046. // Your code here...
  1047. setInterval(() => {
  1048. // 判断当前视频有没有刷完,刷完的话就会暂停,我们就通过左下角是否变成了暂停来进行判断
  1049. // let pauseIcon = document.querySelector('.pausecenterchhulqiaoaix').style.display;
  1050. let pauseIcon = document.querySelector("div[class^='pause']").style.display;
  1051. console.log(pauseIcon)
  1052. // 等于none的时候左下角为暂停,没有出现的时候就为block,出现了以后我们就跳到下一节
  1053. /*
  1054. 这个网站右侧列表课程表当前播放的视频类名为cur_li,我们通过这个来判断,播放完成以后就播放它的下一个视频
  1055. */
  1056. if (pauseIcon == 'none') {
  1057. // 直接拿到下一个视频的跳转连接
  1058. let nextHref = document.querySelector('.cur_li').nextElementSibling.children[0].href
  1059. window.location.href = nextHref;
  1060. }
  1061.  
  1062. }, 3000)
  1063. }, 5000)
  1064. }
  1065.  
  1066.  
  1067.  
  1068. if (window.location.href.indexOf("https://jiangxi.zhipeizaixian.com/study/") != -1) {
  1069. var facejgt = true;
  1070. var dtime = a_time / 5;
  1071. window.setInterval(() => {
  1072. let autonext = document.querySelector(".modal_mark___2vwrm");
  1073. let autoPlay = document.querySelector(".prism-big-play-btn");
  1074. let autoverify = document.querySelector(".ant-modal-confirm-btns");
  1075. let verifyhint = document.querySelector(".ant-modal-wrap");
  1076. let Playbutton = document.querySelector("#J_prismPlayer>video");
  1077. if (autonext != null) { setTimeout(function () { document.querySelector('.next_button___YGZWZ').click(); }, 2000); notifyhint('自动跳转', '已自动跳转下一节'); }
  1078. if (autoPlay.style.display == 'block') { document.querySelector('.outter').click(); if (a_mute) { Playbutton.volume = 0; } }
  1079. if (verifyhint != null) { if (autoverify == null) { if (facejgt) { notifyhint('人脸识别', '出来人脸识别啦!'); facejgt = false; } } }
  1080. if (autoverify != null) { setTimeout(function () { document.querySelector('.ant-btn').click(); notifyhint('弹框验证', '已经继续观看'); }, 2000); }
  1081. if (dtime <= 0) { dtime = a_time / 5; facejgt = true; } dtime--;
  1082. }, 5000);
  1083. notifyhint("启动成功", "已成功导入");
  1084. }
  1085.  
  1086. GM_addValueChangeListener("reload", (name, oldValue, newValue) => {
  1087. if(!flagx){
  1088. try{
  1089. ready_main()
  1090. }catch(e){
  1091.  
  1092. }
  1093. }
  1094. flagx=true
  1095. })
  1096.  
  1097.  
  1098.  
  1099. let alllearning;
  1100. let nolearning = [];
  1101. let ns_player;
  1102. let dbg = true;
  1103.  
  1104.  
  1105. // 上一页
  1106. function ns_pageback() {
  1107. history.back(-1);
  1108. }
  1109.  
  1110. // 获取所有课程
  1111. function ns_nostudy() {
  1112. alllearning = $(".learning-activity");
  1113. for (let i = 0; i < alllearning.length; i++) {
  1114. let str = $(".learning-activity:eq(" + i + ") div.activity-operations-container .completeness").attr("tipsy-literal");
  1115. let zf = str.match(/^<b>(\W+)<\/b>/)[1];
  1116. let type = str.match(/^<b>\W+<\/b><\/br>(\W+)/)[1];
  1117. let typeEum = -1;
  1118. if (type === "完成指标:查看页面") {
  1119. typeEum = 1;
  1120. } else if (type.indexOf("完成指标:需累积观看") > -1) {
  1121. typeEum = 2;
  1122. } else if (type.indexOf("访问线上链接") > -1) {
  1123. typeEum = 3;
  1124. } else if (type.indexOf("完成指标:参与发帖或回帖") > -1) {
  1125. typeEum = 4;
  1126. } else if (type.indexOf("完成指标:观看或下载所有参考资料附件") > -1) {
  1127. typeEum = 5;
  1128. }
  1129. if (zf !== "已完成" && typeEum != -1) {
  1130. $(".learning-activity:eq(" + i + ")>div").click();
  1131. break;
  1132. // nolearning.push({
  1133. // type: typeEum,
  1134. // id:$(".learning-activity:eq("+i+")").attr("id").replace("learning-activity-",""),
  1135. // jq:$(".learning-activity:eq("+i+")")
  1136. // })
  1137. }
  1138. }
  1139. }
  1140.  
  1141. function ns_back(nb) {
  1142. setTimeout(function () {
  1143. ns_pageback();
  1144. }, nb ? nb : 5000);
  1145. }
  1146.  
  1147. //FCQ官网以及备用
  1148. var FCQList=[
  1149. "https://tcb-w644nfbyxrttaih-2cpr71dbf4b7-1304481250.tcloudbaseapp.com/#/?orgin=greasyfork",
  1150. "https://tcb-6773aty6sx2icze-7cwy98013fe9-1304481250.tcloudbaseapp.com/#/?orgin=greasyfork",
  1151. "http://47.121.140.50/#/?orgin=greasyfork",
  1152. ]
  1153.  
  1154.  
  1155. var delay = (time) => new Promise(resolve => {
  1156. setTimeout(() => {
  1157. resolve()
  1158. }, time)
  1159. })
  1160.  
  1161.  
  1162. var GM_req3 = (req_body) => {
  1163. return new Promise((resolve, reject) => {
  1164. setTimeout(()=>{
  1165. reject()
  1166. },10000)
  1167. req_body.headers={
  1168. 'Accept': 'text/javascript, application/javascript, application/ecmascript, application/x-ecmascript, */*; q=0.01',
  1169. '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',
  1170. }
  1171. req_body.onload=res=>{
  1172. resolve(res)
  1173. }
  1174. req_body.onerror=res=>{
  1175. reject()
  1176. }
  1177.  
  1178. GM_xmlhttpRequest(req_body)
  1179. })
  1180. }
  1181.  
  1182. var FCQIndex=GM_getValue('FCQIndex')
  1183.  
  1184. var FCQ=FCQList[FCQIndex||0]
  1185.  
  1186. var openFCQ=async ()=>{
  1187. var prefix=await Promise.race(FCQList.map(async (url,i)=>{
  1188. try{
  1189. var res=await GM_req3({url})
  1190. if((res.response||"").indexOf('<title>meteor-web</title>')!=-1){
  1191. return url
  1192. }
  1193. }catch(e){
  1194.  
  1195. }
  1196. await delay(10000)
  1197. return ""
  1198. }))
  1199. if(!prefix){
  1200. alert('无法打开官网,请加qq群:'+qq_group+"联系管理员处理")
  1201. }else{
  1202. window.open(prefix)
  1203. }
  1204. }
  1205.  
  1206. var checkIndex=async ()=>{
  1207. var FCQIndex=GM_getValue('FCQIndex')
  1208. if(FCQIndex==undefined){
  1209. var index=await Promise.race(FCQList.slice(0,2).map(async (url,i)=>{
  1210. try{
  1211. var res=await GM_req3({url:url})
  1212. if((res.response||"").indexOf('<title>meteor-web</title>')!=-1){
  1213. return i
  1214. }
  1215. }catch(e){
  1216.  
  1217. }
  1218. return -1
  1219. }))
  1220.  
  1221. if(index!=-1){
  1222. FCQIndex=index
  1223. }else{
  1224. FCQIndex=2
  1225. }
  1226. }
  1227. GM_setValue('FCQIndex',FCQIndex)
  1228. FCQ=FCQList[FCQIndex]
  1229. }
  1230.  
  1231. checkIndex()
  1232.  
  1233.  
  1234. var ns_pl = false;
  1235.  
  1236. ; (function (_this) {
  1237.  
  1238. function opeationUi(menu) {
  1239. this.fcq_xm_answer = null;
  1240. this.$ = $;
  1241. this.menu = menu;
  1242. this.xm_window=window
  1243. this.initMenu();
  1244. this.config = {}
  1245. unsafeWindow.mainProcedure=this
  1246. window.mainProcedure=this
  1247. return this;
  1248. }
  1249.  
  1250. opeationUi.prototype.initData = async function () { //初始化
  1251. this.xm_ui.find("#token").val(GM_getValue("token"))
  1252. }
  1253.  
  1254. opeationUi.prototype.toLog = function (explain) {
  1255. setInterval(() => {
  1256. let fcq_xm_select = window.getSelection().toString();
  1257. if (fcq_xm_select) {
  1258. this.xm_ui.find('#fcq_xm_search_text')[0].value = window.getSelection().toString()
  1259. }
  1260. }, 400)
  1261. this.initData();
  1262. return this;
  1263. }
  1264.  
  1265. opeationUi.prototype.arrowMoveMenu = function (e) {
  1266. let elW = e.currentTarget.offsetWidth
  1267. let elH = e.currentTarget.offsetHeight
  1268. let elL = e.currentTarget.parentNode.parentNode.offsetLeft
  1269. let elT = e.currentTarget.parentNode.parentNode.offsetTop
  1270. let x = e.clientX
  1271. let y = e.clientY
  1272. let w = window.innerWidth
  1273. let h = window.innerHeight
  1274. let moveX = x - elL
  1275. let moveY = y - elT
  1276. let el = e.currentTarget
  1277. document.onmousemove = function (e) {
  1278. el.parentNode.parentNode.style.left = e.clientX - moveX + 'px'
  1279. el.parentNode.parentNode.style.top = e.clientY - moveY + 'px'
  1280. }
  1281. document.onmouseup = function (e) {
  1282. document.onmousemove = null
  1283. document.onmouseup = null
  1284. }
  1285. };
  1286.  
  1287. opeationUi.prototype.initMenu = function () {
  1288. let $ = this.$, menu = this.menu;
  1289.  
  1290. var element = $('<div id="fcq_xm_zhu"></div>')[0]
  1291. this.element=element
  1292. var shadow = element.attachShadow({ mode: 'closed' });
  1293. this.xm_ui =$('<div id="fcq_ui"></div>')
  1294. unsafeWindow.fcq_search=true
  1295. const styleTag = `
  1296. <style scoped>
  1297. .fcq_xm_container{
  1298. padding:3px;
  1299. pointer-events: visible;
  1300. position:relative;
  1301. max-height:400px;
  1302. overflow:auto;
  1303. text-align:left;
  1304. display: none;
  1305. width: 100%;
  1306. max-width: 300px;
  1307. z-index: 99999;
  1308. border-radius: 20px !important;
  1309. }
  1310. #${menu.id} p{
  1311. text-align:left;
  1312. padding-left:5px;
  1313. }
  1314. .fcq_xm_img{
  1315. border-radius: 50%;
  1316. background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAsTAAALEwEAmpwYAAAGGmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgOS4xLWMwMDEgNzkuYThkNDc1MywgMjAyMy8wMy8yMy0wODo1NjozNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0RXZ0PSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VFdmVudCMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIDI1LjAgKDIwMjMwODAxLm0uMjI2NSAzYTAwNjIzKSAgKFdpbmRvd3MpIiB4bXA6Q3JlYXRlRGF0ZT0iMjAyMi0wNy0yNFQwMDoyODoxNSswODowMCIgeG1wOk1vZGlmeURhdGU9IjIwMjMtMDgtMjJUMDE6NTE6MjYrMDg6MDAiIHhtcDpNZXRhZGF0YURhdGU9IjIwMjMtMDgtMjJUMDE6NTE6MjYrMDg6MDAiIGRjOmZvcm1hdD0iaW1hZ2UvcG5nIiBwaG90b3Nob3A6Q29sb3JNb2RlPSIzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjkxY2Y1NWExLTZkZTEtYTk0NS1hMDk5LWY0MmNlNTQ5NGY2YiIgeG1wTU06RG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOmYyYWZkOThmLTcyMDItMzE0Ni04M2FjLTJmOGY1YTkxZDk2MiIgeG1wTU06T3JpZ2luYWxEb2N1bWVudElEPSJ4bXAuZGlkOjgxYWIyODgwLWQxYTEtMDA0NC1iZGU3LTk5NDg4YWM0YjA2ZiI+IDx4bXBNTTpIaXN0b3J5PiA8cmRmOlNlcT4gPHJkZjpsaSBzdEV2dDphY3Rpb249ImNyZWF0ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6ODFhYjI4ODAtZDFhMS0wMDQ0LWJkZTctOTk0ODhhYzRiMDZmIiBzdEV2dDp3aGVuPSIyMDIyLTA3LTI0VDAwOjI4OjE1KzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgMjUuMCAoMjAyMzA4MDEubS4yMjY1IDNhMDA2MjMpICAoV2luZG93cykiLz4gPHJkZjpsaSBzdEV2dDphY3Rpb249InNhdmVkIiBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOjkxY2Y1NWExLTZkZTEtYTk0NS1hMDk5LWY0MmNlNTQ5NGY2YiIgc3RFdnQ6d2hlbj0iMjAyMy0wOC0yMlQwMTo1MToyNiswODowMCIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWRvYmUgUGhvdG9zaG9wIDI1LjAgKDIwMjMwODAxLm0uMjI2NSAzYTAwNjIzKSAgKFdpbmRvd3MpIiBzdEV2dDpjaGFuZ2VkPSIvIi8+IDwvcmRmOlNlcT4gPC94bXBNTTpIaXN0b3J5PiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PubJeqwAAARCSURBVDjLbVRrbBRlFD1q+kNDiESNihGDRkOiCVEMGB9ETGhMqn+wxsRgNGlNEBP0hxr1h6YGhIaSYMHW0naf3e1jW4sUSiPQatLS+ihgaal90FbazuzM7O5MZx+z232M985udyvy42R3vm/umXPvPfcCbSbgI7hVwC4ADpkQ5N9XCBWELjikOcICnNI5OJRK+l8CWzAb4yO4l4F24mCuWxBuo6ALFGRacBIa/Cbq/dlnhz8Lu3wZTYHX0LF0EyGT8YNbY8LyQtAqska/Rs//4AT9d0kFYifBrVTAkwI6iaODCZszQKtF+A4RmnlljEYmlMwDI9GNXfOJonu9sok6f+Hezu8s0keWDsBFHA4mdEcBl/5YXtXqVI8smrv6lk6ZpolkOoM3f9EO8VlBZe49FlKv70R9hAmpuE7p1/8RspIa0Twzn3hUiKYwriXRLy2vJVVpHL8pE451iYtwkDg4A1uyRaaLH0QTtTlUC+a+P8NVGVJnnzKwfyQKVuq4brx/Z41oWE2qE7Mx9lw9berbRKh8wwdF9KUNbUrftq5Q1Z4B/b2yAf3JK6EkEkTinDbw3JnQU65p427FyGDfb+H7S86pu575Kfj1+lbl9B2s0kZwCR1EKP/IqT3RGRy9pqVQP2mgZsLAYIBSJJT1LZVvPhn0ffx7uKx1Nr6uZyGBPUM63uhbwueXIhijmOLzWo9VBrs8SlaRB9Eomnc1SKp7Jr6D02LiY1PGxi2tykV8J5hHRqNlvrk4WmYMtM3GUXElYpWB3x0KJB9/0CndsEpgl0TAKw9ZcrkWxwRTiKbXC7HMQ9TNOCoXzEtq6mkO/ILU2KZimNFTFhFjXE89sNYuBTku13k/0KR0wpYzLDVjnVeR7/EqCr6dN6snY29xYCiRhpfUXaWarpDdiKQfWeOQpjkDuOSVjl/jUduftwxf8DQcnDd3XtB6ODCSzGAukoaDGnPoahSHCU3XDbzQHarCUaHgSe60K9BJKWtbrYcVT9GoFTX4kx1z8YfZf4PyMnrFZeylRrzco+LTPyLcZTzfHfrM+vhKnI1K5g7sJmMnAJs8kB+77wVz+8+q7y9K76vLEXxIRLORFA6PxVByXkXtRAweUljWr5daPsybW/ZTg8nYHTQuPn0THGLW3FTHD4b03X9Tp7+kRnwyHKHuxneU9mqvl/RquEiKx9QUPhoKb7Vm3ZZT51FL0MaT0kwD7SHY9XLYFyz3v9uvFw+TBym97ZvaAx5r45BXNzQr3ZUj0VfVRAZkozW3s4ATIte+0tqL7QQcJ7Jqgs0gYmkvf/W+FtnYfCp4dkWxRWjNt2jhxe7QyWdPB4dvs1neO0grjMhCtA8JqCOyWiak1L28hbWX0CCPo0bgPZjdJqs3C5+x72r9Ou2BUrIdbSuC71aEHrpwh3mdUQmkYiI5SugjTBAm6ayftnQdWpRSNASARiJw/5fwXxU4oNDCS+vgAAAAAElFTkSuQmCC);
  1317. background-size: 30px 30px;
  1318. width: 30px;
  1319. height: 30px;
  1320. }
  1321. .mask{
  1322. background-color: rgb(0, 0, 0);
  1323. opacity: 0.3;
  1324. position: fixed;
  1325. width: 100%;
  1326. height: 100%;
  1327. top: 0px;
  1328. left: 0px;
  1329. display: flex;
  1330. justify-content: center;
  1331. align-items: center;
  1332. z-index: 2147483608;
  1333.  
  1334. }
  1335.  
  1336. .box{
  1337. margin: 0;
  1338. padding: 10px;
  1339. background-color: #fff;
  1340. -webkit-background-clip: content;
  1341. border-radius: 2px;
  1342. box-shadow: 1px 1px 50px rgba(0,0,0,.3);
  1343.  
  1344. }
  1345.  
  1346.  
  1347. .xm_t{
  1348. position: fixed;
  1349. width: 100%;
  1350. height: 100%;
  1351. top: 0px;
  1352. left: 0px;
  1353. display: flex;
  1354. justify-content: center;
  1355. align-items: center;
  1356. z-index: 2147483609;
  1357.  
  1358. }
  1359. </style>`;
  1360.  
  1361. $(styleTag).appendTo(this.xm_ui);
  1362. let $menu = $(
  1363. `
  1364.  
  1365. <div id='${menu.id}' style=" font-size:14px;
  1366. z-index: 10000000;
  1367. text-align:center;
  1368. position:fixed;
  1369. background: rgb(240, 249, 235);
  1370. box-shadow: 0 5px 15px rgba(0,0,0,0.8);
  1371. border-radius: 10px;
  1372. left:`+menu.pos.x+`px;
  1373. top:`+menu.pos.y+`px;
  1374. ">
  1375.  
  1376. <div id ="fcq_zhu" style="pointer-events: visible;">
  1377. <div id="fcq_xm_set" style="
  1378. font: unset;
  1379. z-index: 2147483607;
  1380. color: #67c23a;
  1381. padding: 5px;
  1382. display: flex;
  1383. line-height: 1;
  1384. cursor: pointer;
  1385. font-size: 25px;
  1386. width: unset;
  1387. justify-content: center;
  1388. align-items: center;
  1389. ">
  1390. <div class="fcq_xm_img"></div>
  1391. <div>FCQ网课助手</div>
  1392. </div>
  1393. </div>
  1394. <div class= "fcq_xm_container" id="fcq_xm_set_2">
  1395. <div style="display: flex;">
  1396. <div style="width: 45px;"> token:</div><input id = "token" style="
  1397. width: 170px;
  1398. border: none;
  1399. border-radius: 5px;
  1400. border: 2px solid #ccc;
  1401. font-size: 10px;
  1402. outline: none;
  1403. transition: all 0.3s ease-in-out;
  1404.  
  1405. "/>
  1406. <a target='_blank' id="fcq_web" href='`+FCQ+`' style="
  1407. font:unset;
  1408. width: 70px;
  1409. text-align: center;
  1410. display: inline-block;
  1411. background: linear-gradient(to bottom, #4eb5e5 0%,#389ed5 100%);
  1412. border: none;
  1413. border-radius: 5px;
  1414. position: relative;
  1415. border-bottom: 4px solid #2b8bc6;
  1416. color: #fbfbfb;
  1417. font-weight: 600;
  1418. font-family: 'Open Sans', sans-serif;
  1419. text-shadow: 1px 1px 1px rgba(0,0,0,.4);
  1420. font-size: 10px;
  1421. text-indent: 5px;
  1422. box-shadow: 0px 3px 0px 0px rgba(0,0,0,.2);
  1423. cursor: pointer;
  1424. padding: 5px 8px 3px 2px;
  1425.  
  1426. ">获取(官网)</a>
  1427. </div>
  1428. <div style="display: flex;">
  1429. <div style="width: 45px;">题目 :</div><input id = "fcq_xm_search_text" placeholder="" style="width: 170px;
  1430. border: none;
  1431. border-radius: 5px;
  1432. border: 2px solid #ccc;
  1433. font-size: 10px;
  1434. outline: none;
  1435. transition: all 0.3s ease-in-out;
  1436. " />
  1437. <button id="fcq_xm_search" style="
  1438. font:unset;
  1439. display: inline-block;
  1440. background: linear-gradient(to bottom, #4eb5e5 0%,#389ed5 100%);
  1441. border: none;
  1442. border-radius: 5px;
  1443. position: relative;
  1444. border-bottom: 4px solid #2b8bc6;
  1445. color: #fbfbfb;
  1446. font-weight: 600;
  1447. font-family: 'Open Sans', sans-serif;
  1448. text-shadow: 1px 1px 1px rgba(0,0,0,.4);
  1449. font-size: 10px;
  1450. text-align: left;
  1451. text-indent: 5px;
  1452. box-shadow: 0px 3px 0px 0px rgba(0,0,0,.2);
  1453. cursor: pointer;
  1454. padding: 5px 8px 3px 2px;
  1455. width: 80px;
  1456. text-align: center;
  1457.  
  1458. ">开始做题</button>
  1459. </div>
  1460. <div>
  1461. 使用前请先获取登录(不可用)token后填入,选中文字点击搜索即可,更多功能请前往官网查阅,<span style="color:blue">图标可拖动</span>
  1462. </div>
  1463. </div>
  1464. <div class= "fcq_xm_container" id="fcq_xm_answer">
  1465. <p>
  1466. </p>
  1467. </div>
  1468.  
  1469.  
  1470. </div>`);
  1471.  
  1472.  
  1473. var mask=$(`
  1474. <div class="mask_box" style="display:none;">
  1475. <div class="mask">
  1476.  
  1477. </div>
  1478.  
  1479. <div class="xm_t">
  1480.  
  1481. <div class="box" style="
  1482. width: 400px;
  1483. background: white;
  1484. ">
  1485. <div class="top" style="
  1486. width: 100%;
  1487. padding-bottom: 10px;
  1488. text-align: right;
  1489. border-bottom: 1px solid #f0f0f0;
  1490. ">
  1491. <div id="xm_close" style="font-size: 15px;">关闭</div>
  1492.  
  1493. </div>
  1494.  
  1495. <div class="xm_content_trip" style="
  1496. font-size: 15px;
  1497. padding: 10px;
  1498. ">
  1499. </div>
  1500. <div class="bottom" style="
  1501. width: 100%;
  1502. display: flex;
  1503. justify-content: flex-end;
  1504. width: 100%;
  1505. ">
  1506. <div style="height: 28px;
  1507. border-color: #1e9fff;
  1508. background-color: #1e9fff;
  1509. color: #fff;
  1510. line-height: 28px;
  1511. padding: 0 15px;
  1512. border: 1px solid #dedede;
  1513. border-radius: 2px;
  1514. font-weight: 400;
  1515. cursor: pointer;
  1516. text-decoration: none;
  1517. font-size: 15px;
  1518. " id="xm_confirm">确认</div>
  1519. </div>
  1520. </div>
  1521.  
  1522. </div>
  1523.  
  1524.  
  1525. `)
  1526.  
  1527. shadow.appendChild(this.xm_ui[0])
  1528. this.xm_ui[0].appendChild($menu[0])
  1529. this.xm_ui[0].appendChild(mask[0])
  1530.  
  1531. //console.log('页面')
  1532.  
  1533. $(document).ready(()=>{
  1534.  
  1535. $('html').append(element)
  1536. setInterval(()=>{
  1537. if(!$('html').find(element).length){
  1538. $('html').append(element)
  1539. }
  1540. },1000)
  1541.  
  1542. })
  1543.  
  1544. this.fcq_xm_answer = this.xm_ui.find('#fcq_xm_answer');
  1545. this.xm_ui.find('#fcq_xm_set').on('mousedown',(e)=>{
  1546. window.mainProcedure.arrowMoveMenu(e);//.target.parentNode.id
  1547. })
  1548. var click_set= ()=> {
  1549. this.xm_ui.find("#fcq_xm_set_2").toggle('active');
  1550. this.xm_ui.find("#fcq_xm_answer").hide("slow");
  1551. }
  1552. this.xm_ui.find('#fcq_xm_set').on('click',click_set)
  1553. this.xm_ui.find('#token').on('input',()=>{
  1554. console.log('修改',this.xm_ui.find('#token').val())
  1555. GM_setValue("token", this.xm_ui.find('#token').val())
  1556. })
  1557.  
  1558.  
  1559.  
  1560. this.xm_ui.find('#fcq_xm_search').on('click',async ()=>{
  1561. let fcq_xm_answer = this.xm_ui.find("#fcq_xm_answer")
  1562. let text = this.xm_ui.find("#fcq_xm_search_text")[0]
  1563. fcq_xm_answer.show("slow");
  1564. fcq_xm_answer.text("");
  1565. if (text.value.length < 6&&0) {
  1566. fcq_xm_answer.append("搜索题目需要6个字符以上");
  1567. return;
  1568. }
  1569. fcq_xm_answer.append("正在搜索题库中,若长时间未返回信息,请加群"+qq_group+"反馈,注:该接口极易遭受攻击,如果无法正常使用,推荐使用官网内第二个,或耐心等待修复即可<hr>");
  1570. await window.mainProcedure.search(text.value.replace(/ /g, " "))
  1571. fcq_xm_answer.text("");
  1572. fcq_xm_answer.append("搜索到" + window.mainProcedure.config.answer.rows.length + "条相关题目<hr>");
  1573. window.mainProcedure.config.answer.rows.forEach(row => {
  1574. fcq_xm_answer.append("题目:" + row.subject + "<br>" + "答案:");
  1575. row.answers.forEach(answer => {
  1576. fcq_xm_answer.append(answer + " ");
  1577. });
  1578. fcq_xm_answer.append("<hr>");
  1579. });
  1580. })
  1581. }
  1582.  
  1583. opeationUi.prototype.tanchu = function (text,fn){
  1584. if(window.load_zhushou_state||window.fcq_state){
  1585. return
  1586. }
  1587. this.xm_ui.find('.mask_box').css('display','block')
  1588. this.xm_ui.find('.xm_content_trip').html(text)
  1589. var end=()=>{
  1590. this.xm_ui.find('.mask_box').css('display','none')
  1591. this.xm_ui.find('#xm_close')[0].removeEventListener('click', cancelClick)
  1592. this.xm_ui.find('#xm_confirm')[0].removeEventListener('click', confirmClick)
  1593. }
  1594. var confirmClick=()=>{
  1595. if(fn){
  1596. fn(true)
  1597. GM_setValue('userFirst',true)
  1598. }
  1599. end()
  1600. }
  1601. var cancelClick=()=>{
  1602. if(fn){
  1603. fn(!GM_setValue('userFirst'))
  1604. GM_setValue('userFirst',true)
  1605. }
  1606. end()
  1607. }
  1608. this.xm_ui.find('#xm_confirm')[0].addEventListener('click', confirmClick)
  1609. this.xm_ui.find('#xm_close')[0].addEventListener('click', cancelClick)
  1610. }
  1611.  
  1612.  
  1613. opeationUi.prototype.search = function (text){
  1614. return new Promise(resolve => {
  1615. let obj = {
  1616. "action": "search",
  1617. "search": text,
  1618. "token": GM_getValue("token") || ""
  1619. };
  1620. console.log('开始',obj)
  1621. this.xm_ui.find('#token').val(GM_getValue("token"))
  1622. var xm_answer=this.xm_ui.find("#fcq_xm_answer")
  1623. GM_xmlhttpRequest({
  1624. timeout: 10000,
  1625. method: "POST",
  1626. url: "https://fc-mp-1420928c-320a-4dca-a246-45b4e1ddf142.next.bspapp.com/api",
  1627. data: JSON.stringify(obj),
  1628. onload: response=> {
  1629. var data = JSON.parse(response.response)
  1630. console.log('返回结果',data)
  1631. window.mainProcedure.config.answer = {}
  1632. if (data.list) {
  1633. window.mainProcedure.config.answer.rows = data.list.map(c => {
  1634. return {
  1635. subject: c.title,
  1636. answers: c.answer
  1637. }
  1638. })
  1639. resolve()
  1640. } else {
  1641. if(data.msg){
  1642. this.tanchu(data.msg)
  1643. }else{
  1644. this.tanchu('FCQ服务器出错,可能被人恶意攻击了,请耐心等待修复或者点击确认查看官网更多版本',(clickState)=>{
  1645. if(clickState){
  1646. openFCQ()
  1647. }
  1648. },{
  1649. btn:['确认']
  1650. })
  1651. }
  1652. }
  1653. },
  1654. onerror: function (err) {
  1655. console.log('error')
  1656. xm_answer.append("发生异常:" + err);
  1657. },
  1658. ontimeout: function (inf) {
  1659. console.log('请求超时')
  1660. xm_answer.append("请求超时:" + inf);
  1661. }
  1662. })
  1663.  
  1664. })
  1665. }
  1666.  
  1667. opeationUi.prototype.start = function (reslist) {
  1668. return this.api.start_search()
  1669. }
  1670.  
  1671. _this.opeationUi = opeationUi;
  1672. })(window);
  1673.  
  1674.  
  1675. var fingerprintLog=(key)=>{
  1676. if(typeof Fingerprint2!='undefined'&&window === window.parent){
  1677. if(!GM_getValue('fingerprintLog')||GM_getValue('fingerprintLog')[key]!=0){
  1678. Fingerprint2.get(components => {
  1679. const values = components.map(function (component, index) {
  1680. if (index === 0) {
  1681. return component.value.replace(/\bNetType\/\w+\b/, "")
  1682. }
  1683. return component.value
  1684. })
  1685. const murmur = Fingerprint2.x64hash128(values.join(''), 31);
  1686. var data=GM_getValue('fingerprintLog')||{
  1687. fingerprint:murmur,
  1688. plugin:{
  1689. scriptHandler:GM_info.scriptHandler,
  1690. scriptVersion:GM_info.version,
  1691. name:GM_info.script.name,
  1692. version:GM_info.script.version
  1693. },
  1694. userAgent:navigator.userAgent
  1695. }
  1696. if(key){
  1697. data[key]=0
  1698. }
  1699. GM_xmlhttpRequest({
  1700. timeout: 10000,
  1701. method: "POST",
  1702. url: "http://121.4.44.3:6397/fingerprint",
  1703. headers: {
  1704. "Content-type": "application/json;charset=UTF-8"
  1705. },
  1706. data: JSON.stringify(data),
  1707. onload: response=> {
  1708. GM_setValue('fingerprintLog',data)
  1709. }
  1710. })
  1711. });
  1712. }
  1713. }
  1714. }
  1715.  
  1716. if (window.location == window.parent.location||window.location.host.indexOf('tcloudbaseapp.com')!=-1) { // 判断是否为ifarm
  1717.  
  1718. new window.opeationUi({
  1719. id: "niu",
  1720. width: 80,
  1721. background: '#fff',
  1722. opacity: 0.8,
  1723. pos: {
  1724. x: 50,
  1725. y: 300
  1726. }
  1727. }).toLog('0');
  1728. if(!GM_getValue("fcq_xm_init")){
  1729. window.mainProcedure.xm_ui.find("#fcq_xm_set_2").toggle('active');
  1730. window.mainProcedure.xm_ui.find("#fcq_xm_answer").hide("slow");
  1731. GM_setValue("fcq_xm_init",true)
  1732. }
  1733. var userFirst=GM_getValue('userFirst')
  1734. if(!GM_getValue('userFirst')){
  1735. fingerprintLog('step')
  1736. }
  1737.  
  1738. setTimeout(()=>{
  1739. if(!(userFirst&&!GM_getValue('token')&&!unsafeWindow.load_zhushou_state)&&window.location.host.indexOf('tcloudbaseapp.com')==-1&&!unsafeWindow.fcq_state){
  1740. window.mainProcedure.tanchu('FCQ网课助手提示:首次使用脚本需要填写token,点击确定前往获取',(clickState)=>{
  1741. if(clickState){
  1742. openFCQ()
  1743. }
  1744. },{
  1745. btn:['确认']
  1746. })
  1747. }
  1748.  
  1749. if(!unsafeWindow.fcq_state&&window.location == window.parent.location){
  1750. $('html').append(`<iframe style="display:none;left: 0px;" src="`+FCQ+`"></iframe>`)
  1751. }
  1752. },2000)
  1753.  
  1754. }
  1755.  
  1756.  
  1757.  
  1758.  
  1759. // 判断url是在课程首页
  1760. if (/https:\/\/lms.ouchn.cn\/course\/\d+\/ng#\//m.test(document.URL)) {
  1761. nsd("当前在课程首页");
  1762. // 判断全部展开按钮
  1763. let cai = $(".expand-collapse-all-button>i");
  1764. if (cai.hasClass("font-toggle-all-collapsed")) {
  1765. nsd("点击全部展开");
  1766. cai.click();
  1767. }
  1768. // 加载所有课程
  1769. setInterval(function () {
  1770. nsd("获取所有课程");
  1771. ns_nostudy();
  1772. }, 5000);
  1773. } else if (/https:\/\/lms.ouchn.cn\/course\/\d+\/learning-activity\/full-screen#\/\d+/m.test(document.URL)) {
  1774. nsd("在详情页");
  1775. // 处理详情
  1776. setTimeout(function () {
  1777. // 2秒监控一次
  1778. setInterval(function () {
  1779. ns_player = $(".vjs-tech")[0];
  1780. if (ns_player) {
  1781. nsd("页面有视频")
  1782. ns_playover();
  1783. ns_start();
  1784. } else {
  1785. nsd("页面没视频")
  1786. ns_todown();
  1787. }
  1788. }, 5000);
  1789. }, 15000);
  1790. }
  1791.  
  1792. try{
  1793. Mustache.render_partial(gV())
  1794. }catch(e){
  1795. // console.log('报错',e)
  1796. }
  1797.  
  1798.  
  1799. function ns_todown() {
  1800. if ($(".open-link-button").html() && $(".open-link-button").html().indexOf("新页签打开") > -1) {
  1801. nsd("处理点击链接")
  1802. $(".open-link-button>i").click();
  1803.  
  1804. ns_back();
  1805. } else if ($(".embeded-new-topic").html() && $(".embeded-new-topic").html().indexOf("发表帖子") > -1 && !ns_pl) {
  1806. nsd("处理发表帖子")
  1807. $(".embeded-new-topic>i").click();
  1808. $("#add-topic-popup > div > div.topic-form-section.main-area > form > div:nth-child(1) > div.field > input").val("好好学习").trigger('change');
  1809. setTimeout(function () {
  1810. $("#add-topic-popup > div > div.popup-footer > div > button.button.button-green.medium").click();
  1811. ns_pl = true;
  1812.  
  1813. ns_back(10000);
  1814. }, 1000);
  1815. } else if ($("div.attachment-column.column.large-3 a:eq(0)")[0]) {
  1816. nsd("处理文件预览")
  1817. $("div.attachment-column.column.large-3 a:eq(0)").click();
  1818.  
  1819. ns_back();
  1820. } else {
  1821. nsd("处理其他")
  1822. $(".___content").scrollTop(999999);
  1823. $(document.getElementById("previewContentInIframe").contentWindow.document).scrollTop(999999);
  1824.  
  1825. ns_back();
  1826. }
  1827. }
  1828.  
  1829. /**
  1830. * 点击所有li
  1831. */
  1832. function ns_allclick() {
  1833. let ali = $(".module-list>ul>li>div");
  1834. for (let index = 0; index < ali.length; index++) {
  1835. const element = ali[index];
  1836. $(element).click();
  1837. }
  1838. }
  1839.  
  1840. /**
  1841. * 播放方法
  1842. */
  1843.  
  1844.  
  1845. function ns_play() {
  1846. ns_player.playbackRate = 16;
  1847. ns_player.muted = true;
  1848. $("div.mvp-replay-player-all-controls > div.mvp-controls-left-area > button > i").click();
  1849. }
  1850.  
  1851. /**
  1852. * 判断是否暂停,如果暂停,就调用播放方法
  1853. */
  1854. function ns_start() {
  1855. if (ns_player.paused && ns_player.duration !== ns_player.currentTime) {
  1856. ns_play();
  1857. }
  1858. }
  1859.  
  1860.  
  1861. /**
  1862. * 如果播放完毕,调用播放下一个视频的方法
  1863. */
  1864. function ns_playover() {
  1865. if (ns_player.duration === ns_player.currentTime) {
  1866. ns_back();
  1867. }
  1868. }
  1869.  
  1870. /**
  1871. * 播放下一个视频,如果有弹窗,那就播放当前视频
  1872. */
  1873. function ns_playnext() {
  1874. let actlist = $(".activity-list>li");
  1875. let flag = false;
  1876. for (let i = 0; i < actlist.length; i++) {
  1877. if (flag) {
  1878. if ($($(".activity-list>li")[i]).parent().parent().find("> div > div > span").text() != "视频学习") {
  1879. continue;
  1880. }
  1881. $(".activity-list>li:eq(" + i + ")>div").click();
  1882. let popup = $(".prerequisites-confirmation-popup");
  1883. for (let j = 0; j < popup.length; j++) {
  1884. if (popup[j].style.display === "block") {
  1885. $(".prerequisites-confirmation-popup:eq(" + j + ") .form-buttons>button").click();
  1886. ns_play();
  1887. break;
  1888. }
  1889. }
  1890. break;
  1891. }
  1892. if ($(actlist[i]).hasClass("active")) {
  1893. flag = true;
  1894. }
  1895. }
  1896. }
  1897.  
  1898. function nsd(str) {
  1899. if (dbg) {
  1900. console.log(str);
  1901. }
  1902. }
  1903.  
  1904.  
  1905.  
  1906. var startTime = 5000; //刷课间隔时间 //若超过该时间页面还未加载则自动跳过
  1907. var IntervalTime = 2000;//监测时长
  1908. var Video_muted = true; //开启静音
  1909. var Video_speed = 4; //倍速设置 最大16
  1910.  
  1911. (function () {
  1912. 'use strict';
  1913. const urls = { 'course': 'https://www.zjooc.cn/ucenter/student/course/study/[A-Za-z0-9]+/plan/detail/[A-Za-z0-9]+' };
  1914.  
  1915. var ListStudy_main = [];
  1916. var ListStudy_view = [];
  1917.  
  1918. var ListStudy_main_now;
  1919. var ListStudy_view_now;
  1920.  
  1921. var Interval;
  1922. var LN = 0;
  1923. var MN = 0;
  1924.  
  1925.  
  1926. var url = unsafeWindow.location.href;
  1927. var href = new RegExp(urls.course);
  1928. CONSOLE();
  1929. LOG(href.test(url));
  1930. if (href.test(url)) {
  1931. unsafeWindow.setTimeout(function () {
  1932. LOG("=========== 开始执行脚本 =========");
  1933. for (var i = 0; i < document.querySelectorAll('.el-submenu__title').length; i++) { if (i > 0) document.querySelectorAll('.el-submenu__title')[i].click() }
  1934. GET_MAIN_LIST();
  1935. LOG("------------");
  1936. GET_VIEW_LIST();
  1937. LOG("------------");
  1938. //LOG(ListStudy_main);
  1939. //LOG(ListStudy_view);
  1940. if (ListStudy_main == "") {
  1941. LOG("全部完成");
  1942. } else {
  1943. ListStudy_main_now.click();
  1944. if (ListStudy_view == "") {
  1945. LOG("当前小节已完成");
  1946. NEXT_MAIN();
  1947. } else {
  1948. ListStudy_view_now.click();
  1949. unsafeWindow.setTimeout(AUTO_COURSE, startTime);
  1950. }
  1951. }
  1952. }, startTime);
  1953. }
  1954.  
  1955. function AUTO_COURSE() {
  1956. if (Interval) {
  1957. unsafeWindow.clearInterval(Interval);
  1958. }
  1959. LOG("============= 开始刷课 ===========");
  1960. LOG("当前课时:" + ListStudy_view_now.innerText);
  1961. if (document.querySelector('iframe')) {
  1962. LOG("类型【文档】");
  1963. var document_ok = document.querySelector('.contain-bottom').querySelectorAll('button.el-button.el-button--default');
  1964. LOG("文档按钮" + document_ok);
  1965. if (document_ok) {
  1966. for (var i = 0; i < document_ok.length; i++) document_ok[i].click();
  1967. LOG("正在执行文档程序");
  1968. }
  1969. LOG("============= 结束刷课 ===========");
  1970. NEXT_VIEW();
  1971. } else {
  1972. LOG("类型【视频】");
  1973. var video = document.querySelector('video');
  1974. LOG("[寻找VIDEO]" + video);
  1975. if (video) {
  1976. video.autoplay = "autoplay";
  1977. video.muted = Video_muted;
  1978. video.playbackRate = Video_speed;
  1979. var p = document.querySelector('video');
  1980. if (p) p.click();
  1981. Interval = unsafeWindow.setInterval(VIDEO_OK, IntervalTime);
  1982. }
  1983. }
  1984. }
  1985.  
  1986. function VIDEO_OK() {
  1987. try {
  1988. var video = document.querySelector('video');
  1989. var bar = video.parentNode.children[2];
  1990. var processBar = bar.children[7];
  1991. var times = processBar.innerText.split('/');
  1992. var now = times[0].trim();
  1993. var end = times[1].trim();
  1994. LOG(times);
  1995. if (now == end) {
  1996. if (Interval) {
  1997. unsafeWindow.clearInterval(Interval);
  1998. }
  1999. LOG("============= 结束刷课 ===========");
  2000. unsafeWindow.setTimeout(NEXT_VIEW, startTime);
  2001. }
  2002. } catch (err) {
  2003. LOG("[ERROR] " + err);
  2004. if (Interval) {
  2005. unsafeWindow.clearInterval(Interval);
  2006. }
  2007. unsafeWindow.setTimeout(NEXT_VIEW, startTime);
  2008. }
  2009. }
  2010.  
  2011. function NEXT_MAIN() {
  2012. MN += 1;
  2013. if (MN >= ListStudy_main.length) {
  2014. LOG("全部完成");
  2015. alert("🎉 本课程学习完毕");
  2016. } else {
  2017. ListStudy_main_now = ListStudy_main[MN];
  2018. ListStudy_main_now.click();
  2019. LOG("正在切换下一章节");
  2020. unsafeWindow.setTimeout(function () {
  2021. GET_VIEW_LIST();
  2022. if (ListStudy_view == "") {
  2023. LOG("当前小节已完成");
  2024. NEXT_MAIN();
  2025. } else {
  2026. ListStudy_view_now.click();
  2027. unsafeWindow.setTimeout(function () { AUTO_COURSE() }, startTime);
  2028. }
  2029. }, startTime);
  2030. }
  2031. }
  2032.  
  2033. function NEXT_VIEW() {
  2034. LN += 1;
  2035. if (LN >= ListStudy_view.length) {
  2036. LOG("当前小节已完成");
  2037. NEXT_MAIN();
  2038. } else {
  2039. ListStudy_view_now = ListStudy_view[LN];
  2040. ListStudy_view_now.click();
  2041. //LOG("当前课时:"+ListStudy_view_now.innerText);
  2042. //LOG("下一课时:"+ListStudy_view_now.nextSibling.innerText);
  2043. unsafeWindow.setTimeout(AUTO_COURSE, startTime);
  2044. }
  2045. }
  2046.  
  2047. function GET_MAIN_LIST() {
  2048. ListStudy_main = [];
  2049. MN = 0;
  2050. LOG("[学习章节]");
  2051. LOG("-------------");
  2052. //get main list
  2053. var main_list = document.querySelector('.base-asider ul[role="menubar"]');
  2054. for (var a = 0; a < main_list.childElementCount; a++) {
  2055. var sec_list = main_list.children[a].children[1];
  2056. for (var b = 0; b < sec_list.childElementCount; b++) {
  2057. var _e = sec_list.children[b];
  2058. //if(_e.getAttribute('tabindex')=='0')//-1 unfinish 0 finish
  2059. //{
  2060. // LOG("finished");
  2061. //}else{
  2062. LOG(_e.innerText);
  2063. ListStudy_main.push(_e);
  2064. //}
  2065. }
  2066. }
  2067. //end
  2068. ListStudy_main_now = ListStudy_main[0];
  2069. ListStudy_main_now.click();
  2070. LOG("-------------");
  2071. }
  2072.  
  2073. function GET_VIEW_LIST() {
  2074. ListStudy_view = [];
  2075. LN = 0;
  2076. LOG("[学习小节]");
  2077. LOG("-------------");
  2078. var list = document.querySelector('.plan-detailvideo div[role="tablist"]');
  2079. for (var i = 0; i < list.childElementCount; i++) {
  2080. var e = list.children[i];
  2081. if (e.querySelector('i').classList.contains('complete'))//finished
  2082. {
  2083. LOG("finished");
  2084. } else {
  2085. LOG(e.innerText);
  2086. ListStudy_view.push(e);
  2087. }
  2088. }
  2089. ListStudy_view_now = ListStudy_view[0];
  2090. LOG("-------------");
  2091. }
  2092.  
  2093. function LOG(info) {
  2094. $('#console').append('<div class="" style="marginLeft:10px;"><span id="">' + info + '</span></div>');
  2095. $('#console').scrollTop(10000000);
  2096. }
  2097.  
  2098. function CONSOLE() {
  2099. unsafeWindow.onload = function () {
  2100. return;
  2101. var box = '<div class="CONSOLE" style="border: 2px dashed rgb(0, 85, 68);width: 330px; position: fixed; top: 0; right: 0; z-index: 99999;background-color: #e8e8e8; overflow-x: auto;"><button id="close_console">隐藏控制台</button><div class="console_box" id="console" style="height:360px;background:#fff;margin:10px auto 0;overflow:auto;"><div class="info"><div class="time"></div></div></div></div>';
  2102. $('body').append(box);
  2103. document.getElementById("close_console").onclick = function () {
  2104. var b = document.getElementById("console");
  2105. if (document.getElementById("close_console").innerText == '隐藏控制台') {
  2106. b.style.display = "none";
  2107. document.getElementById("close_console").innerText = "显示控制台";
  2108. }
  2109. else {
  2110. b.style.display = "";
  2111. document.getElementById("close_console").innerText = "隐藏控制台";
  2112. }
  2113. }
  2114. }
  2115. }
  2116.  
  2117. })();
  2118.  
  2119.  
  2120.  
  2121.  
  2122.  
  2123.  
  2124.  
  2125. function show_homework_answer(str) {
  2126. var ua = navigator.userAgent;
  2127. var opacity = '0.95';
  2128. if (ua.indexOf("Edge") >= 0) {
  2129. opacity = '0.6';
  2130. } else {
  2131. opacity = '0.95';
  2132. }
  2133. var copyTextBox = '<div id="copy-text-box" style="width:100%;height:100%;position: fixed;z-index: 9999;display: block;top: 0px;left: 0px;background:rgba(255,255,255,' + opacity + ');-webkit-backdrop-filter: blur(20px);display: flex;justify-content:center;align-items:center;">' +
  2134. '<div id="copy-text-box-close" style="width:100%;height:100%;position:fixed;top:0px;left:0px;"></div>' +
  2135. '<pre id="copy-text-content" style="width:60%;font-size:16px;line-height:22px;z-index:10000;white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;word-break:break-all;max-height:70%;overflow:auto;"></pre>' +
  2136. '</div>"';
  2137. $('#copy-text-box').remove();
  2138. $('body').append(copyTextBox);
  2139. $('#copy-text-content').html(str);
  2140. $('#copy-text-box-close').click(function () {
  2141. $('#copy-text-box').remove();
  2142. });
  2143. }
  2144. function get_spoc_homework_answer(id) {
  2145. if (id) {
  2146. var post_data = `callCount=1
  2147. scriptSessionId=\${scriptSessionId}190
  2148. c0-scriptName=MocQuizBean
  2149. c0-methodName=getHomeworkPaperDto
  2150. c0-id=0
  2151. c0-param0=number:PARAM_ID
  2152. c0-param1=null:null
  2153. c0-param2=boolean:false
  2154. c0-param3=number:1
  2155. c0-param4=number:0
  2156. batchId=0`
  2157. post_data = post_data.replace("PARAM_ID", id)
  2158. console.log(post_data)
  2159. //post start
  2160. GM_xmlhttpRequest({
  2161. method: "POST",
  2162. data: post_data,
  2163. headers: {
  2164. "Content-Type": "application/x-www-form-urlencoded"
  2165. },
  2166. url: "https://www.icourse163.org/dwr/call/plaincall/MocQuizBean.getHomeworkPaperDto.dwr",
  2167. onload: function (response) {
  2168. //console.log(response.responseText)
  2169. //console.log(s2)
  2170. var answer_str = ""
  2171. for (var i = 0; i < s2.length; i++) {
  2172. var judgeDtos = s2[i].judgeDtos
  2173. for (var j = 0; j < judgeDtos.length; j++) {
  2174. console.log(judgeDtos[j].msg)
  2175. answer_str += "<p>" + String(i + 1) + ":" + judgeDtos[j].msg + "</p>"
  2176. }
  2177. }
  2178. show_homework_answer(answer_str)
  2179. }
  2180. });
  2181. //post end
  2182. }
  2183. }
  2184. function get_answer(aid, id) {
  2185. if (aid && id) {
  2186. var post_data = "callCount=1\n"
  2187. post_data += "scriptSessionId=${scriptSessionId}190\n"
  2188. post_data += "httpSessionId=1d4ae12c733f41f495fc1fcbaeccd4f2\n"
  2189. post_data += "c0-scriptName=MocQuizBean\n"
  2190. post_data += "c0-methodName=getQuizPaperDto\n"
  2191. post_data += "c0-id=0\n"
  2192. post_data += "c0-param0=string:" + id + "\n"
  2193. post_data += "c0-param1=number:" + aid + "\n"
  2194. post_data += "c0-param2=boolean:true\n"
  2195. post_data += "batchId=0"
  2196. GM_xmlhttpRequest({
  2197. method: "POST",
  2198. data: post_data,
  2199. headers: {
  2200. "Content-Type": "application/x-www-form-urlencoded"
  2201. },
  2202. url: "https://www.icourse163.org/dwr/call/plaincall/MocQuizBean.getQuizPaperDto.dwr",
  2203. onload: function (response) {
  2204. var qlist = document.getElementsByClassName("j-list")[0].children[0].children
  2205. //s1 is question list
  2206. //var qnum=qlist.childElementCount
  2207. for (var i = 0; i < s1.length; i++) {
  2208. var answer = "";
  2209. var analyse = "";
  2210. if (s1[i].stdAnswer) {
  2211. answer = s1[i].stdAnswer;
  2212. } else {
  2213. for (var j = 0; j < s1[i].optionDtos.length; j++) {
  2214. var choice = s1[i].optionDtos[j]
  2215. if (choice.answer) {
  2216. answer += "ABCD"[j]//+":"
  2217. //answer+=choice.content+"\n"
  2218. }
  2219. if (choice.analyse) {
  2220. analyse += choice.analyse
  2221. }
  2222. }
  2223. }
  2224. if (s1[i].analyse) {
  2225. analyse += s1[i].analyse
  2226. }
  2227. console.log(answer)
  2228. console.log(analyse)
  2229. answer = answer.replace("##%_YZPRLFH_%##", "或")
  2230. var raw_html = `<div class="analysisInfo ">
  2231. <div>
  2232. <span class="f-f0 tt1">正确答案:
  2233. </span>
  2234. <span class="f-f0 tt2">ANSWER
  2235. </span>
  2236. </div>
  2237. <div>
  2238. <b>解析:ANALYSE
  2239. </div>
  2240. </div>`
  2241. var $node = $(qlist[i])
  2242. raw_html = raw_html.replace("ANSWER", answer)
  2243. raw_html = raw_html.replace("ANALYSE", analyse ? analyse : "无")
  2244. $node.append(raw_html)
  2245.  
  2246. }
  2247.  
  2248. }
  2249. });
  2250.  
  2251.  
  2252. }
  2253. }
  2254. function main() {
  2255. var aid = 0;
  2256. var id = 0;
  2257. if (aid && id) {
  2258. var topBox = "<div style='position:fixed;z-index:999999;background-color:#ccc;cursor:pointer;top:200px;left:0px;'>" +
  2259. "<div id='pre_analysis' style='font-size:13px;padding:10px 2px;color:#FFF;background-color:#25AE84;'>提前解析</div>" +
  2260. "</div>";
  2261. $("body").append(topBox);
  2262. $("body").on("click", "#pre_analysis", function () {
  2263. get_answer(aid, id);
  2264. });
  2265.  
  2266. } else {
  2267. var hash = document.location.hash;
  2268. if (hash.indexOf("/learn/hw?id=") > 0) {
  2269. //parse hash
  2270. var homework_Box = "<div style='position:fixed;z-index:999999;background-color:#ccc;cursor:pointer;top:200px;left:0px;'>" +
  2271. "<div id='get_homework_answer' style='font-size:13px;padding:10px 2px;color:#FFF;background-color:#25AE84;'>获取作业答案</div>" +
  2272. "</div>";
  2273. $("body").append(homework_Box);
  2274. $("body").on("click", "#get_homework_answer", function () {
  2275. get_spoc_homework_answer(id)
  2276. });
  2277. }
  2278. }
  2279.  
  2280. };
  2281.  
  2282. var wait_time = 6;
  2283. function enableStartExam() {
  2284. var btn_exam = $("#jrks");
  2285. showExam(true);
  2286. var p = $("<p> </p>");
  2287. p.appendTo(btn_exam);
  2288. setTimeout(() => {
  2289. p.trigger('click');
  2290. }, wait_time);
  2291. }
  2292. function sleep(time, unit) {
  2293. if (time == null) { time = wait_time * 1000; }
  2294. if (unit != null) { time = time * 1000; }
  2295. for (var t = Date.now(); Date.now() - t <= time;);
  2296. }
  2297. var fuc = setInterval(function () {
  2298. //晚点再写
  2299. }, wait_time * 1000);
  2300. // xm_window.GM_info
  2301.  
  2302.  
  2303. if (window.location.href.indexOf("onlineenew.enetedu.com") != -1) {
  2304. function randomNum(minNum, maxNum) {
  2305. switch (arguments.length) {
  2306. case 1:
  2307. return parseInt(Math.random() * minNum + 1, 10);
  2308. break;
  2309. case 2:
  2310. return parseInt(Math.random() * (maxNum - minNum + 1) + minNum, 10);
  2311. break;
  2312. default:
  2313. return 0;
  2314. break;
  2315. }
  2316. }
  2317. window.onload=function(){
  2318. let pppplay = setInterval(function(){
  2319. if($(".classcenter-chapter1 iframe").contents().find(".layui-layer-content iframe").length > 0){
  2320. setTimeout(function(){
  2321. $(".classcenter-chapter1 iframe").contents().find(".layui-layer-content iframe").contents().find("#questionid~div button").trigger("click")
  2322. }, randomNum(15, 40) * 100);
  2323. } else {
  2324. $(".classcenter-chapter1 iframe").contents().find("video").trigger("play")
  2325. }
  2326. console.log(new Date().getTime(), $(".classcenter-chapter1 iframe").length, $(".classcenter-chapter1 iframe").contents().find(".layui-layer-content iframe").length)
  2327. },5000);
  2328. setTimeout(function(){
  2329. $(".classcenter-chapter1 iframe").contents().find("video").on("timeupdate",function(){
  2330. if(Math.ceil(this.currentTime) >= Math.ceil(this.duration)) {
  2331. //clearInterval(pppplay);
  2332. let flag = false;
  2333. $(".classcenter-chapter2 ul li").each(function(t){
  2334. console.log($(this).css("background-color") == "rgb(204, 197, 197)")
  2335. if ($(this).css("background-color") != "rgb(204, 197, 197)") {
  2336. if ($(this).find("span").text() != "[100%]") {
  2337. flag = true;
  2338. $(this).trigger("click");
  2339. return false;
  2340. }
  2341. }
  2342. });
  2343. if(!flag) {
  2344. clearInterval(pppplay);
  2345. }
  2346. }
  2347. })
  2348. },8000);
  2349. }
  2350. }
  2351.  
  2352.  
  2353.  
  2354. if (window.location.href.indexOf("qingshunxuetang.com") != -1) {
  2355.  
  2356. let domain = 'https://degree.qingshuxuetang.com/'
  2357. let url=location.href;
  2358. if (url.indexOf('Course/CourseList') > -1) {
  2359. setTimeout(function() {
  2360. console.log('currentCourse',currentCourse)
  2361. sessionStorage.setItem('courses',JSON.stringify(currentCourse))
  2362. let course = currentCourse[0];
  2363. window.location.href=`${domain}cgjy/Student/Course/CourseStudy?courseId=${course.courseId}&teachPlanId=${course.teachPlanId}&periodId=${course.periodId}`
  2364. }, 3000)
  2365. }else if(url.indexOf('Course/CourseStudy') > -1){
  2366. setTimeout(function() {
  2367. console.log('coursewareMedias',coursewareMedias)
  2368. var videos=[];
  2369. getVideoNode(coursewareMedias,videos)
  2370. console.log('videos',videos);
  2371. let video = videos[0];
  2372. let courseId = getQueryString('courseId');
  2373. let teachPlanId = getQueryString('teachPlanId');
  2374. let periodId = getQueryString('periodId');
  2375. let videoMaps = {}
  2376. videoMaps[courseId] = videos;
  2377. sessionStorage.setItem('videos',JSON.stringify(videoMaps))
  2378. window.location.href=`https://degree.qingshuxuetang.com/cgjy/Student/Course/CourseShow?teachPlanId=${teachPlanId}&periodId=${periodId}&courseId=${courseId}&nodeId=${video.id}`
  2379. }, 3000)
  2380. }else if(url.indexOf('Course/CourseShow') > -1){
  2381. let courseId = getQueryString('courseId');
  2382. let nodeId = getQueryString('nodeId');
  2383. let videoMaps = JSON.parse(sessionStorage.getItem('videos'))
  2384. let teachPlanId = getQueryString('teachPlanId');
  2385. let periodId = getQueryString('periodId');
  2386. let nextVideo = getNextVideo(nodeId,videoMaps[courseId])
  2387. setTimeout(function() {
  2388. var video = document.getElementsByTagName("video")[0]
  2389. //设置静音
  2390. video.muted = true
  2391. //视频倍速
  2392. video.playbackRate = 2
  2393. //视频开始
  2394. video.play()
  2395. const nextUrl = `https://degree.qingshuxuetang.com/cgjy/Student/Course/CourseShow?teachPlanId=${teachPlanId}&periodId=${periodId}&courseId=${courseId}&nodeId=${nextVideo}`
  2396. // 下一条视频
  2397. video.addEventListener("ended",function(){
  2398. if(nextVideo == null){
  2399. let courses = JSON.parse(sessionStorage.getItem('courses'))
  2400. let course = getNextCourse(courseId,courses)
  2401. if(course == null){
  2402. window.location.href='https://baidu.com'
  2403. }
  2404. window.location.href=`${domain}cgjy/Student/Course/CourseStudy?courseId=${course.courseId}&teachPlanId=${course.teachPlanId}&periodId=${course.periodId}`
  2405. }else{
  2406. location.replace(nextUrl);
  2407. }
  2408. })
  2409. }, 5000)
  2410. getVideoTime()
  2411.  
  2412. }
  2413.  
  2414. function getNextVideo(current,videos){
  2415. let next =null;
  2416. Array.prototype.forEach.call(videos,function (value,index) {
  2417. if(value.id === current && videos.length-1 > index+1){
  2418. next = videos[index+1].id
  2419. return false
  2420. }
  2421. })
  2422. return next;
  2423. }
  2424.  
  2425. function getNextCourse(current,courses){
  2426. let next =null;
  2427. Array.prototype.forEach.call(courses,function (value,index) {
  2428. if(value.courseId == current && courses.length-1 > index+1){
  2429. next = courses[index+1]
  2430. return false
  2431. }
  2432. })
  2433. return next;
  2434. }
  2435.  
  2436. function getVideoNode(medias,videos){
  2437. Array.prototype.forEach.call(medias,function (value,index) {
  2438. if(value.type === 'video'){
  2439. videos.push(value)
  2440. }
  2441. if(value.nodes !=null){
  2442. getVideoNode(value.nodes,videos)
  2443. }
  2444. })
  2445. }
  2446.  
  2447. function getQueryString(name) {
  2448. var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
  2449. var r = window.location.search.substr(1).match(reg);
  2450. if (r != null) {
  2451. return unescape(r[2]);
  2452. }
  2453. return null;
  2454. }
  2455.  
  2456. let currentVideoTime =null;
  2457.  
  2458. function getVideoTime() {
  2459. setInterval(function () {
  2460. var vid = document.getElementsByTagName("video")[0]
  2461. var currentTime = vid.currentTime.toFixed(1);
  2462. if(currentTime == currentVideoTime){
  2463. console.log('视频卡住了,刷新~');
  2464. location.reload()
  2465. }
  2466. currentVideoTime = currentTime;
  2467. console.log('视频时间:', currentTime);
  2468. }, 5000);
  2469. }
  2470. }
  2471.  
  2472.  
  2473.  
  2474. if (window.location.href.indexOf("172.20.32.191/redir.php?catalog_id=6&cmd=dati") != -1) {
  2475.  
  2476. var host = window.location.host;
  2477. if (host != "10.66.100.207" && host != "172.26.0.150") {
  2478. var questions = document.getElementsByClassName("shiti");
  2479. var _question, question, index, answer;
  2480. var notfounds = new Array(), dislocations = new Array();
  2481. var notfound = 0, dislocation = 0;
  2482. for (let i = 0, __qlength__ = questions.length; i < __qlength__; ++i) {
  2483. _question = questions[i].children[0].textContent.split("\u3001");
  2484. index = _question.shift();
  2485. question = _question.join("\u3001").replace(/[^0-9A-Za-z\u4e00-\u9fff]/g, "").replace(/^(\u5224\u65ad|\u5355\u9009|\u591a\u9009)\u9898/, "");
  2486. answer = findAnswer(question);
  2487. var _text, _c, c, answers;
  2488. var answered = false;
  2489. if (answer != "") {
  2490. answers = answer.split("\u000a");
  2491. for (let choice = 0, __clength__ = questions[i].children[1].childElementCount; choice < __clength__; ++choice) {
  2492. var ipt = document.getElementById("ti_" + index + "_" + String(choice));
  2493. _text = ipt.parentNode.children[1].textContent.replace(/[\s\?]/g, "");
  2494. if (_text.length == 0) {
  2495. dislocations[dislocation++] = String(index);
  2496. questions[i].children[0].setAttribute("style", "color: red");
  2497. } else {
  2498. _c = _text.replace(/\./, "\u3001").replace(/\uff0e/, "\u3001").split("\u3001");
  2499. if (_c.length > 1) {
  2500. _c.shift();
  2501. }
  2502. c = _c.join("\u3001");
  2503. c = c.replace("\u6b63\u786e", "\u5bf9").replace("\u9519\u8bef", "\u9519");
  2504. for (let ai = 0, __alength__ = answers.length; ai < __alength__; ++ai) {
  2505. if (answers[ai] == c) {
  2506. ipt.click();
  2507. answered = true;
  2508. break;
  2509. }
  2510. }
  2511. }
  2512. }
  2513. if (!answered) {
  2514. notfounds[notfound++] = String(index);
  2515. questions[i].children[0].setAttribute("style", "color: red");
  2516. }
  2517. } else {
  2518. notfounds[notfound++] = String(index);
  2519. questions[i].children[0].setAttribute("style", "color: red");
  2520. }
  2521. }
  2522. if (notfound > 0 || dislocation > 0) {
  2523. if (notfound > 0) {
  2524. alert("\u6b64\u9875\u9762\u5171\u6709" + String(notfound) + "\u9053\u9898\u672a\u80fd\u81ea\u52a8\u586b\u5145\uff1a" + notfounds.join("\u3001"));
  2525. }
  2526. if (dislocation > 0) {
  2527. alert("\u6b64\u9875\u9762\u5171\u6709" + String(dislocation) + "\u9053\u9898\u7531\u4e8e\u9009\u9879\u9519\u4f4d\uff0c\u5df2\u9009\u62e9\u6b63\u786e\u4f46\u4e0d\u5f97\u5206\u9009\u9879\uff1a" + dislocations.join("\u3001"));
  2528. }
  2529. } else {
  2530. var next = document.getElementsByClassName("nav")[0].children[0];
  2531. if (next && next.value == "\u4e0b\u4e00\u9875") {
  2532. next.click();
  2533. } else {
  2534. document.getElementsByClassName("nav")[0].children[1].click();
  2535. }
  2536. }
  2537. } else {
  2538. let Qs = new Array();
  2539. let __QsLen__ = 0;
  2540. if (document.getElementById("DataGridA")) {
  2541. for (let i = 0, __Q__ = document.getElementById("DataGridA").children[0], __QLen__ = __Q__.childElementCount; i < __QLen__; ++i) {
  2542. Qs[__QsLen__++] = __Q__.children[i];
  2543. }
  2544. }
  2545. if (document.getElementById("DataGridB")) {
  2546. for (let i = 0, __Q__ = document.getElementById("DataGridB").children[0], __QLen__ = __Q__.childElementCount; i < __QLen__; ++i) {
  2547. Qs[__QsLen__++] = __Q__.children[i];
  2548. }
  2549. }
  2550. if (document.getElementById("DataGridC")) {
  2551. for (let i = 0, __Q__ = document.getElementById("DataGridC").children[0], __QLen__ = __Q__.childElementCount; i < __QLen__; ++i) {
  2552. Qs[__QsLen__++] = __Q__.children[i];
  2553. }
  2554. }
  2555. let notfounds = new Array();
  2556. let notfound = 0;
  2557. for (let i = 0; i < __QsLen__; ++i) {
  2558. let t = Qs[i].children[0].children[0].children[0];
  2559. let _Q = t.children[0].children[0].children[0].textContent.split("\u3001");
  2560. let index = _Q.shift();
  2561. let Q = _Q.join("\u3001").replace(/[^0-9A-Za-z\u4e00-\u9fff]/g, "");
  2562. let A = findAnswer(Q);
  2563. let As = A.split("\u000a");
  2564. let Cs = t.children[1].children[0].children[0].children[0].children[0];
  2565. let answered = false;
  2566. for (let j = 0, __CsLen__ = Cs.childElementCount; j < __CsLen__; ++j) {
  2567. let _C = Cs.children[j].children[1].textContent.replace(/\./, "\u3001").replace(/\uff0e/, "\u3001").split("\u3001");
  2568. if (_C.length > 1) {
  2569. _C.shift();
  2570. }
  2571. let C = _C.join("\u3001");
  2572. C = C.replace("\u6b63\u786e", "\u5bf9").replace("\u9519\u8bef", "\u9519");
  2573. for (let k = 0, __AsLen__ = As.length; k < __AsLen__; ++k) {
  2574. if (C == As[k]) {
  2575. Cs.children[j].children[0].click();
  2576. answered = true;
  2577. break;
  2578. }
  2579. }
  2580. }
  2581. if (!answered) {
  2582. notfounds[notfound++] = String(index);
  2583. t.children[0].children[0].children[0].setAttribute("style", "color: red");
  2584. }
  2585. }
  2586. if (notfound > 0) {
  2587. alert("\u6b64\u9875\u9762\u5171\u6709" + String(notfound) + "\u9053\u9898\u672a\u80fd\u81ea\u52a8\u586b\u5145\uff1a" + notfounds.join("\u3001"));
  2588. }
  2589. }
  2590. }
  2591.  
  2592.  
  2593.  
  2594. }
  2595.  
  2596. ready_main()

QingJ © 2025

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