Greasy Fork is available in English.

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

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

  1. // ==UserScript==
  2. // @name FCQ网课通助手[全网题库][通用智能适配答题][刷课]
  3. // @namespace http://tampermonkey6.net
  4. // @version 1.0.49
  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 greasyfork.org
  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 47.115.205.88
  492. // @connect mcsever.xyz
  493. // @connect tcloudbaseapp.com
  494. // @connect ylnu.edu.cn
  495. // @connect yuyuetiku.com
  496. // @connect pearktrue.cn
  497. // @connect ynny.cn
  498. // @connect zjlll.net
  499. // @connect lovezhc.cn
  500. // @connect localhost
  501. // @connect gyrs.xyz
  502. // @connect gyrs.top
  503. // @connect qq.com
  504. // @connect 51aidian.com
  505. // @connect 611qk.com
  506. // @connect zxtiku.com
  507. // @connect you-yun.com.cn
  508. // @connect yktong.net
  509. // @connect nmgdj.gov.cn
  510. // @connect toujianyun.com
  511. // @connect gxpf.cn
  512. // @connect 51xinwei.com
  513. // @connect ibodao.com
  514. // @connect szou.edu.cn
  515. // @connect yncjxy.com
  516. // @connect moycp.com
  517. // @connect htexam.com
  518. // @connect alicdn.com
  519. // @connect staticfile.net
  520. // @connect zxx.edu.cn
  521. // @connect eduyun.cn
  522. // @connect rzcwl.com
  523. // @connect 101.com
  524. // @connect zjtvu.edu.cn
  525. // @connect hnust.edu.cn
  526. // @connect hnsyu.net
  527. // @connect zut.edu.cn
  528. // @connect hfut.edu.cn
  529. // @connect xust.edu.cn
  530. // @connect xueyinonline.com
  531. // @connect cqrspx.cn
  532. // @connect cugbonline.cn
  533. // @connect xynu.edu.cn
  534. // @connect neauce.com
  535. // @connect ecnusole.com
  536. // @connect xinyingzao.cn
  537. // @connect w-ling.cn
  538. // @connect aust.edu.cn
  539. // @connect ahmooc.cn
  540. // @connect pinganmeiyu.com
  541. // @connect bjxtwlkj.com
  542. // @connect finedu.com.cn
  543. // @connect cdcas.com
  544. // @connect gyrs.online
  545. // @connect tiku.me
  546. // @connect 808860.xyz
  547. // @connect repl.co
  548. // @connect ioscx.com
  549. // @connect ksrr.net
  550. // @connect bobo91.com
  551. // @connect promplate.dev
  552. // @connect binjie.fun
  553. // @connect gptforlove.com
  554. // @connect yeyu2048.xyz
  555. // @connect webtrncdn.com
  556. // @connect suda.edu.cn
  557. // @connect xjjwedu.com
  558. // @connect gxmzu.edu.cn
  559. // @connect cug.edu.cn
  560. // @connect cuc.edu.cn
  561. // @connect jsnu.edu.cn
  562. // @connect henu.edu.cn
  563. // @connect ahu.edu.cn
  564. // @connect smu.edu.cn
  565. // @connect nuaa.edu.cn
  566. // @connect rtjy.com.cn
  567. // @connect cqust.edu.cn
  568. // @connect bjtu.edu.cn
  569. // @connect bzpt.edu.cn
  570. // @connect gyrs.fun
  571. // @connect 91faka.com
  572. // @connect o-learn.cn
  573. // @connect lidapoly.edu.cn
  574. // @connect baichuan-ai.com
  575. // @connect chatforai.store
  576. // @connect onrender.com
  577. // @connect 168xc.top
  578. // @connect xiguashuwang.com
  579. // @connect hangzhou.gov.cn
  580. // @connect chatgpt.com
  581. // @connect gking.me
  582. // @connect aichatos8.xyz
  583. // @connect caifree.com
  584. // @connect 644566.xyz
  585. // @connect matools.com
  586. // @connect xjrsjxjy.com
  587. // @connect shqszx.com
  588. // @connect xju.edu.cn
  589. // @connect myccr.net
  590. // @connect 5zk.com.cn
  591. // @connect zjtvu.edu.cn
  592. // @connect sdsafeschool.gov.cn
  593. // @connect cqsdx.cn
  594. // @connect huashenxt.com
  595. // @connect ahut.edu.cn
  596. // @connect jsduxing.com
  597. // @connect hut.edu.cn
  598. // @connect xzit.edu.cn
  599. // @connect fjdfxy.com
  600. // @connect longzhi.net.cn
  601. // @connect jcpx-psych.com
  602. // @connect zhi-ti.com
  603. // @connect szqinqi.com
  604. // @connect chineseworkers.com.cn
  605. // @connect cfyedu.com
  606. // @connect mynj.cn
  607. // @connect zbwsrc.cn
  608. // @connect qwjiaoyu.com
  609. // @connect aitianhu1.top
  610. // @connect wwwwqq.com
  611. // @connect viaa.fun
  612. // @connect wendabao-a.top
  613. // @connect bixin123.com
  614. // @connect ai365vip.com
  615. // @connect ichuang.top
  616. // @connect ichat2019.com
  617. // @connect tinycms.xyz
  618. // @connect jaze.top
  619. // @connect chkzh.com
  620. // @connect wanjuantiku.com
  621. // @connect 611520.cn
  622. // @connect moiu.cn
  623. // @connect tttt.ee
  624. // @connect hnvist.cn
  625. // @connect mosoteach.cn
  626. // @connect cloudstatic.cn
  627. // @connect cloudbasefunction.cn
  628. // @connect qcloud.la
  629. // @connect wk66.top
  630. // @connect 911285.xyz
  631. // @connect xmig6.cn
  632. // @connect 026wk.xyz
  633. // @connect 6hck.xyz
  634. // @connect 52xn.xyz
  635. // @connect siliconflow.cn
  636. // @connect xunhupay.com
  637. // @connect toolchest.cn
  638. // @connect guilan.cn
  639. // @connect 127.0.0.1
  640. // @connect *
  641. // @antifeature payment
  642. // @antifeature referral-link
  643. // ==/UserScript==
  644.  
  645.  
  646. const HAS_GM = typeof GM !== 'undefined';
  647. const NEW_GM = ((scope, GM) => {
  648. // Check if running in Tampermonkey and if version supports redirect control
  649. if (GM_info.scriptHandler !== "Tampermonkey" || compareVersions(GM_info.version, "5.3.2") < 0) return;
  650.  
  651. // Backup original functions
  652. const GM_xmlhttpRequestOrig = GM_xmlhttpRequest;
  653. const GM_xmlHttpRequestOrig = GM.xmlHttpRequest;
  654.  
  655. function compareVersions(v1, v2) {
  656. const parts1 = v1.split('.').map(Number);
  657. const parts2 = v2.split('.').map(Number);
  658. const length = Math.max(parts1.length, parts2.length);
  659.  
  660. for (let i = 0; i < length; i++) {
  661. const num1 = parts1[i] || 0;
  662. const num2 = parts2[i] || 0;
  663.  
  664. if (num1 > num2) return 1;
  665. if (num1 < num2) return -1;
  666. }
  667. return 0;
  668. }
  669.  
  670. // Wrapper for GM_xmlhttpRequest
  671. function GM_xmlhttpRequestWrapper(odetails) {
  672. // If redirect is manually set, simply pass odetails to the original function
  673. if (odetails.redirect !== undefined) {
  674. return GM_xmlhttpRequestOrig(odetails);
  675. }
  676.  
  677. // Warn if onprogress is used with settings incompatible with fetch mode used in background
  678. if (odetails.onprogress || odetails.fetch === false) {
  679. console.warn("Fetch mode does not support onprogress in the background.");
  680. }
  681.  
  682. const {
  683. onload,
  684. onloadend,
  685. onerror,
  686. onabort,
  687. ontimeout,
  688. ...details
  689. } = odetails;
  690.  
  691. // Set redirect to manual and handle redirects
  692. const handleRedirects = (initialDetails) => {
  693. const request = GM_xmlhttpRequestOrig({
  694. ...initialDetails,
  695. redirect: 'manual',
  696. onload: function (response) {
  697. if (response.status >= 300 && response.status < 400) {
  698. const m = response.responseHeaders.match(/Location:\s*(\S+)/i);
  699. // Follow redirect manually
  700. const redirectUrl = m && m[1];
  701. if (redirectUrl) {
  702. const absoluteUrl = new URL(redirectUrl, initialDetails.url).href;
  703. handleRedirects({ ...initialDetails, url: absoluteUrl });
  704. return;
  705. }
  706. }
  707.  
  708. if (onload) onload.call(this, response);
  709. if (onloadend) onloadend.call(this, response);
  710. },
  711. onerror: function (response) {
  712. if (onerror) onerror.call(this, response);
  713. if (onloadend) onloadend.call(this, response);
  714. },
  715. onabort: function (response) {
  716. if (onabort) onabort.call(this, response);
  717. if (onloadend) onloadend.call(this, response);
  718. },
  719. ontimeout: function (response) {
  720. if (ontimeout) ontimeout.call(this, response);
  721. if (onloadend) onloadend.call(this, response);
  722. }
  723. });
  724. return request;
  725. };
  726.  
  727. return handleRedirects(details);
  728. }
  729.  
  730. // Wrapper for GM.xmlHttpRequest
  731. function GM_xmlHttpRequestWrapper(odetails) {
  732. let abort;
  733.  
  734. const p = new Promise((resolve, reject) => {
  735. const { onload, ontimeout, onerror, ...send } = odetails;
  736.  
  737. send.onerror = function (r) {
  738. if (onerror) {
  739. resolve(r);
  740. onerror.call(this, r);
  741. } else {
  742. reject(r);
  743. }
  744. };
  745. send.ontimeout = function (r) {
  746. if (ontimeout) {
  747. // See comment above
  748. resolve(r);
  749. ontimeout.call(this, r);
  750. } else {
  751. reject(r);
  752. }
  753. };
  754. send.onload = function (r) {
  755. resolve(r);
  756. if (onload) onload.call(this, r);
  757. };
  758.  
  759. const a = GM_xmlhttpRequestWrapper(send).abort;
  760. if (abort === true) {
  761. a();
  762. } else {
  763. abort = a;
  764. }
  765. });
  766.  
  767. p.abort = () => {
  768. if (typeof abort === 'function') {
  769. abort();
  770. } else {
  771. abort = true;
  772. }
  773. };
  774.  
  775. return p;
  776. }
  777.  
  778. // Export wrappers
  779. GM_xmlhttpRequest = GM_xmlhttpRequestWrapper;
  780. scope.GM_xmlhttpRequestOrig = GM_xmlhttpRequestOrig;
  781.  
  782. const gopd = Object.getOwnPropertyDescriptor(GM, 'xmlHttpRequest');
  783. if (gopd && gopd.configurable === false) {
  784. return {
  785. __proto__: GM,
  786. xmlHttpRequest: GM_xmlHttpRequestWrapper,
  787. xmlHttpRequestOrig: GM_xmlHttpRequestOrig
  788. };
  789. } else {
  790. GM.xmlHttpRequest = GM_xmlHttpRequestWrapper;
  791. GM.xmlHttpRequestOrig = GM_xmlHttpRequestOrig;
  792. }
  793. })(this, HAS_GM ? GM : {});
  794.  
  795. if (HAS_GM && NEW_GM) GM = NEW_GM;
  796.  
  797.  
  798. if (typeof GM_xmlhttpRequest == 'undefined' || GM_info.scriptHandler == 'stay') {
  799. 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 如果反复提示此信息,请从插件中删除此脚本")
  800. return;
  801. }
  802.  
  803. setInterval(() => {
  804. if (window.xm_ui) {
  805. var content = window.xm_ui.find("#xm_share:contains(更新)").clone()
  806. window.xm_ui.find("#xm_share:contains(更新)").remove()
  807. window.xm_ui.find('#xm_state').before(content.attr("id", "xm_update").click(() => {
  808. window.open("https://greasyfork.org/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")
  809. }))
  810. }
  811. }, 1000)
  812. var flagx = false
  813. var ready_main = () => {
  814.  
  815.  
  816.  
  817. if (window.ggxmm) {
  818. setInterval(() => {
  819. var $ = $_
  820. console.log('循环运行')
  821. if ($(".el-message-box:contains(本小节学习已完成) span:contains(确定):visible").length || $('.vjs-remaining-time-display').text() == '-0:00') {
  822. $(".el-message-box:contains(本小节学习已完成) span:contains(确定):visible").click()
  823. console.log('学习完成')
  824. setTimeout(() => {
  825. $('font:contains(播放下一节)').click()
  826. }, 500)
  827.  
  828. } else {
  829. $('.vjs-big-play-button').click()
  830. }
  831.  
  832. }, 1000)
  833. }
  834.  
  835. function gV() {
  836. return GM_getValue("oc")
  837. }
  838.  
  839. function loop() {
  840. setTimeout(() => {
  841. if (window.self !== window.top) {
  842. return;
  843. }
  844. let videoElem;
  845. videoElem = document.querySelector('#iframe').contentDocument.querySelector('iframe').contentDocument.querySelector('#video_html5_api');
  846. if (!videoElem) {
  847. return;
  848. }
  849. let videoLi = document.querySelectorAll('.posCatalog_name');
  850. let videoCu = document.querySelector('.posCatalog_active span');
  851. let videoNext;
  852. for (let i = 0, len = videoLi.length; i < len; i++) {
  853. if (videoLi[i] == videoCu) {
  854. videoNext = videoLi[i + 1];
  855. break;
  856. }
  857. }
  858. function AnsQues() {
  859. let check = setInterval(() => {
  860. try {
  861. let text = document.querySelector('iframe').contentDocument.querySelector('iframe').contentDocument.querySelector('iframe').contentDocument.querySelector('body > div:last-child').innerText;
  862. if (text.slice(0, 5) === '答题已完成') {
  863. clearInterval(check);
  864. document.querySelector('iframe').contentDocument.querySelector('iframe').contentDocument.querySelector('iframe').contentDocument.querySelector('.Btn_blue_1').click()
  865. setTimeout(() => {
  866. document.querySelector('iframe').contentDocument.querySelector('iframe').contentDocument.querySelector('iframe').contentDocument.querySelector('#confirmSubWin .bluebtn').click()
  867. setTimeout(() => {
  868. videoNext.click();
  869. if (videoNext != videoLi[videoLi.length - 1]) {
  870. loop();
  871. }
  872. }, 2000)
  873. }, 50)
  874. return;
  875. }
  876. else if (text.match('题目待完善')) {
  877. clearInterval(check);
  878. videoNext.click();
  879. if (videoNext != videoLi[videoLi.length - 1]) {
  880. loop();
  881. }
  882. return;
  883. }
  884. }
  885. catch {
  886. }
  887. }, 2000)
  888. }
  889. let jobLeft;
  890. try {
  891. jobLeft = document.querySelector('.posCatalog_active input').value;
  892. }
  893. catch {
  894. videoNext.click();
  895. if (videoNext != videoLi[videoLi.length - 1]) {
  896. loop();
  897. }
  898. return;
  899. }
  900. if (jobLeft == 2) {
  901. videoElem.onended = () => {
  902. document.querySelector('#dct2').click();
  903. setTimeout(AnsQues, 2000);
  904. }
  905. }
  906. else if (jobLeft == 1) {
  907. if (!document.querySelector('#iframe').contentDocument.querySelector('.ans-job-finished')) {
  908. videoElem.onended = videoNext.click();
  909. }
  910. else {
  911. document.querySelector('#dct2').click();
  912. setTimeout(AnsQues, 2000);
  913. }
  914. }
  915. }, 5000);
  916. }
  917. function taolun() {
  918. const body = document.querySelector("body")
  919. const btn = document.createElement("button")
  920. btn.onclick = allComment
  921. btn.style.padding = "10px"
  922. btn.style.backgroundColor = "skyblue"
  923. btn.style.position = "fixed"
  924. btn.style.right = "100px"
  925. btn.style.top = "400px"
  926. btn.textContent = "一键回复"
  927. body.appendChild(btn)
  928. async function allComment() {
  929. console.log("1111")
  930. const name = document.querySelector(".zt_u_name").textContent
  931. const commentDoms = document.querySelectorAll("#showTopics .content1118 .oneDiv")
  932. for (let i = 0; i < commentDoms.length; i++) {
  933. if (commentDoms[i].innerHTML.indexOf(name) === -1) {
  934. const comment = commentDoms[i].querySelector(".hf_pct").textContent
  935. const replyBtn = commentDoms[i].querySelector(".clearfix .tl1")
  936. replyBtn.click()
  937. let textarea = commentDoms[i].querySelector(".plDiv textarea")
  938. while (!textarea) {
  939. textarea = commentDoms[i].querySelector(".plDiv textarea")
  940. }
  941. textarea.value = comment
  942. const uploadBtn = commentDoms[i].querySelector(".plDiv grenBtn")
  943. uploadBtn.click()
  944. await new Promise((re) => {
  945. setTimeout(() => { re() }, 200)
  946. })
  947. console.log(comment, replyBtn)
  948. }
  949. }
  950. }
  951.  
  952. }
  953. function dafen() {
  954. var button = document.createElement('button');
  955. button.innerHTML = '一键打分';
  956. button.style.position = 'absolute'; // 或者 'absolute' 如果您想要相对于某个容器定位
  957. button.style.top = '10px'; // 距离顶部 10px
  958. button.style.left = '50%'; // 居中
  959. button.style.zIndex = '9999';
  960. button.style.padding = '10px';
  961. button.style.backgroundColor = '#008CBA';
  962. button.style.color = 'white';
  963. button.style.border = 'none';
  964. button.style.borderRadius = '5px';
  965. button.style.cursor = 'pointer';
  966.  
  967.  
  968. document.body.appendChild(button);
  969.  
  970.  
  971.  
  972. // 点击按钮时的处理函数
  973. button.onclick = function () {
  974. // 获取所有具有 class "inputBranch makeScore" 的 input 元素
  975. const inputs = document.querySelectorAll('input.inputBranch.makeScore');
  976.  
  977. // 遍历这些 input 元素
  978. inputs.forEach(input => {
  979. // 获取 input 元素的 data 属性值
  980. const dataValue = input.getAttribute('data');
  981.  
  982. // 将 data 属性值赋给 value 属性
  983. input.value = dataValue;
  984. });
  985. //总分
  986. var fullScoreElement = document.getElementById("fullScore");
  987. // 获取id为sumScore的元素
  988. var sumScoreElement = document.getElementById("sumScore");
  989.  
  990. // 检查这两个元素是否存在
  991. if (fullScoreElement && sumScoreElement) {
  992. // 将fullScore的value值赋给sumScore的value
  993. sumScoreElement.value = fullScoreElement.value;
  994. document.querySelector('.jb_btn_92.fr.fs14.marginLeft30').click();
  995.  
  996. }
  997.  
  998.  
  999. };
  1000.  
  1001. }
  1002.  
  1003. function daochu() {
  1004. // 定义一个函数来导出题目
  1005. function exportQuestions() {
  1006. var questions = $('.stem_con');
  1007. var output = '';
  1008.  
  1009. questions.each(function (index) {
  1010. var questionText = $(this).find('p').text().trim();
  1011. var options = $(this).next('.stem_answer').find('.num_option, .answer_p');
  1012. // 寻找紧接在当前题目的下一个.answerDiv作为答案部分
  1013. var nextAnswerDiv = $(this).nextUntil('.stem_con').filter('.answerDiv');
  1014. var answer = nextAnswerDiv.find('.answer_tit p').text().trim();
  1015.  
  1016. output += (index + 1) + '. ' + questionText + '\r\n';
  1017. options.each(function (optionIndex) {
  1018. if (optionIndex % 2 === 0) { // 选项字母
  1019. var letter = $(this).text().trim();
  1020. output += letter + ' ';
  1021. } else { // 选项文本
  1022. output += $(this).text().trim() + '\r\n';
  1023. }
  1024. });
  1025. output += '#' + answer + '#\r\n';
  1026. });
  1027.  
  1028. saveStringToFile("<TikS><本试卷使用TikN学习通导出工具V1.0自动生成>" + output, "导出习题.tik")
  1029. }
  1030.  
  1031. function saveStringToFile(str, filename) {
  1032. var blob = new Blob([str], { type: "text/plain;charset=utf-8" });
  1033. var link = document.createElement('a');
  1034. link.href = window.URL.createObjectURL(blob);
  1035. link.download = filename;
  1036. link.click();
  1037. }
  1038.  
  1039. // 当页面加载完成时执行导出函数
  1040. $(document).ready(exportQuestions);
  1041. }
  1042.  
  1043. var qq_group = "399697149"
  1044.  
  1045. unsafeWindow.$_ = $
  1046. if (window.location.href.indexOf("https://service.icourses.cn/") != -1) {
  1047. const config = {
  1048. pdf_time: 20 * 60 * 1000//30分鐘
  1049. }
  1050. let ChapterList = []
  1051. function GetRessList(id) {
  1052. return new Promise((resolve, reject) => {
  1053. GM_xmlhttpRequest({
  1054. url: "https://service.icourses.cn/hep-company//sword/company/getRess",
  1055. method: "POST",
  1056. data: "sectionId=" + id,
  1057. headers: {
  1058. "Content-type": "application/x-www-form-urlencoded; charset=UTF-8"
  1059. },
  1060. onload: function (xhr) {
  1061. try {
  1062. resolve(JSON.parse(xhr.responseText).model.listRes)
  1063. }
  1064. catch (err) {
  1065. resolve([])
  1066. }
  1067. }
  1068. });
  1069. })
  1070. }
  1071. function OpenOriginDialog(Content) {
  1072. return new Promise((resolve, reject) => {
  1073. unsafeWindow.require(["Play"], function (Play) {
  1074. let courseId = unsafeWindow._courseId;
  1075. let userId = unsafeWindow._userId;
  1076. let companyCode = unsafeWindow._companyCode;
  1077. const ListenMessage = (e) => {
  1078. if (e.data === 'lhd_close') {
  1079. unsafeWindow.removeEventListener('message', ListenMessage)
  1080. document.querySelector('[id^=dialog-myModal]')?.remove()
  1081. resolve()
  1082. }
  1083. }
  1084. unsafeWindow.addEventListener('message', ListenMessage);
  1085. Play.dialog({
  1086. //唯一ID
  1087. id: "videoBox-link",
  1088. data: {
  1089. url: Content.fullResUrl,
  1090. companyCode: companyCode,//三方公司id
  1091. resId: Content.id,
  1092. type: Content.mediaType,
  1093. userId: userId,
  1094. courseId: courseId,
  1095. title: Content.title + ''
  1096. },
  1097. //弹出框宽度
  1098. width: "auto",
  1099. //弹出框高度
  1100. height: (screen.availHeight - 200) + "px",
  1101. //是否开启打点功能
  1102. isTicker: true
  1103. });
  1104. })
  1105. })
  1106. }
  1107. async function ExecteContentMission(Contet) {
  1108. return new Promise(async (resolve, reject) => {
  1109. await OpenOriginDialog(Contet)
  1110. //执行相关内容
  1111. resolve()
  1112. })
  1113. }
  1114. async function AutoExecteChaprterMission(ChapterList) {
  1115. for (let index = 0; index < ChapterList.length; index++) {
  1116. let CurrentChapert = ChapterList[index]//获取每个章
  1117. let ContentList = await GetRessList(CurrentChapert)//获取该章数据
  1118. for (let ContentIndex = 0; ContentIndex < ContentList.length; ContentIndex++) {
  1119. let CurrentContent = ContentList[ContentIndex]//遍历内容数据列表
  1120. await ExecteContentMission(CurrentContent)//执行内容
  1121. }
  1122.  
  1123. }
  1124. }
  1125. function InjectButtonToBody() {
  1126. let btn = document.createElement("div");
  1127. btn.innerHTML = '<button style="position: fixed;bottom: 80vw;right: 0;z-index: 9999;height: 50px;">开始刷课</button>';
  1128. btn.onclick = function () {
  1129. ChapterList = []
  1130. ChapterList = ChapterList.concat(...document.querySelectorAll(".shareResources > .panel-group > li"))
  1131. let ParentChapert = document.querySelectorAll(".shareResources > .panel-group > li:not(.noContent)")
  1132. ParentChapert.forEach((item) => {
  1133. ChapterList = ChapterList.concat(...item.querySelectorAll(".chapter-content [data-secid]"))
  1134. });
  1135. ChapterList = ChapterList.map((item) => item.getAttribute("data-id") ?? item.getAttribute("data-secid"))
  1136. AutoExecteChaprterMission(ChapterList)
  1137. }
  1138. document.body.append(btn);
  1139. }
  1140. function InjectVideoPage() {
  1141. unsafeWindow.savevideojs = undefined
  1142. Object.defineProperty(unsafeWindow, 'videojs', {
  1143. get() {
  1144. let result = unsafeWindow.savevideojs;
  1145. return result
  1146. },
  1147. set(vdobj) {
  1148. vdobj.hook('beforesetup', function (videoEl, options) {
  1149. options.muted = true;
  1150. options.autoplay = true;
  1151. return options;
  1152. });
  1153. vdobj.hook('setup', function (player) {
  1154. player.on("ended", function () {
  1155. });
  1156. });
  1157. unsafeWindow.savevideojs = vdobj;
  1158.  
  1159. }
  1160. })
  1161. }
  1162. function InjectPdfPage() {
  1163. setTimeout(() => {
  1164. }, config.pdf_time)
  1165. }
  1166. function MainBranch() {
  1167. if (location.href.indexOf('/sword/rp/play/toPlay') !== -1) {
  1168. InjectVideoPage()
  1169. } else if (location.href.indexOf('/icourse/lib/pdfjs/web/') !== -1) {
  1170. InjectPdfPage()
  1171. } else {
  1172. InjectButtonToBody()
  1173. }
  1174. }
  1175. MainBranch()
  1176.  
  1177. }
  1178.  
  1179. setTimeout(() => {
  1180. if (GM_getValue('userFirst') && window.location == window.parent.location && !unsafeWindow.fcq_state) {
  1181. GM_setValue('fingerprintDate', GM_getValue('fingerprintDate') || new Date().getTime())
  1182. if (new Date().getTime() - GM_getValue('fingerprintDate') > 30 * 1000 && GM_getValue('fingerprintLog') && GM_getValue('fingerprintLog')['step4'] != 0) {
  1183. alert('FCQ脚本出错,请加群' + qq_group + '联系bug管理员处理,修复完成后将会获得1000搜题积分奖励')
  1184. }
  1185. }
  1186. }, 2000)
  1187.  
  1188. if (window.location.href.indexOf("https://hzzh.chsi.com.cn/kc/xx/") != -1) {
  1189. let rate = 2;//倍速
  1190. unsafeWindow.onload = function () {
  1191. //在元素都加载完成后再监听video的播放时间,再进行倍速设置
  1192. unsafeWindow.document.querySelector('video').onplay = function () {
  1193. unsafeWindow.document.querySelector('video').playbackRate = rate;
  1194. }
  1195. let hookSetInterval = unsafeWindow.setInterval;
  1196. unsafeWindow.setInterval = function (a, b) {
  1197. return hookSetInterval(a, b / rate);
  1198. }
  1199. unsafeWindow.document.querySelector('video').volume = 0
  1200. unsafeWindow.document.querySelector('video').play()
  1201. var elevideo = document.querySelector("video");
  1202. elevideo.addEventListener('ended', function () { //结束
  1203. unsafeWindow.document.querySelector('video').play()
  1204. });
  1205. }
  1206. }
  1207.  
  1208. if (window.location.href.indexOf("https://training.tisco.com.cn/front/command/LessonAction") != -1) {
  1209. setTimeout(() => {
  1210. // Your code here...
  1211. setInterval(() => {
  1212. // 判断当前视频有没有刷完,刷完的话就会暂停,我们就通过左下角是否变成了暂停来进行判断
  1213. // let pauseIcon = document.querySelector('.pausecenterchhulqiaoaix').style.display;
  1214. let pauseIcon = document.querySelector("div[class^='pause']").style.display;
  1215. console.log(pauseIcon)
  1216. // 等于none的时候左下角为暂停,没有出现的时候就为block,出现了以后我们就跳到下一节
  1217. /*
  1218. 这个网站右侧列表课程表当前播放的视频类名为cur_li,我们通过这个来判断,播放完成以后就播放它的下一个视频
  1219. */
  1220. if (pauseIcon == 'none') {
  1221. // 直接拿到下一个视频的跳转连接
  1222. let nextHref = document.querySelector('.cur_li').nextElementSibling.children[0].href
  1223. window.location.href = nextHref;
  1224. }
  1225.  
  1226. }, 3000)
  1227. }, 5000)
  1228. }
  1229.  
  1230.  
  1231.  
  1232. if (window.location.href.indexOf("https://jiangxi.zhipeizaixian.com/study/") != -1) {
  1233. var facejgt = true;
  1234. var dtime = a_time / 5;
  1235. window.setInterval(() => {
  1236. let autonext = document.querySelector(".modal_mark___2vwrm");
  1237. let autoPlay = document.querySelector(".prism-big-play-btn");
  1238. let autoverify = document.querySelector(".ant-modal-confirm-btns");
  1239. let verifyhint = document.querySelector(".ant-modal-wrap");
  1240. let Playbutton = document.querySelector("#J_prismPlayer>video");
  1241. if (autonext != null) { setTimeout(function () { document.querySelector('.next_button___YGZWZ').click(); }, 2000); notifyhint('自动跳转', '已自动跳转下一节'); }
  1242. if (autoPlay.style.display == 'block') { document.querySelector('.outter').click(); if (a_mute) { Playbutton.volume = 0; } }
  1243. if (verifyhint != null) { if (autoverify == null) { if (facejgt) { notifyhint('人脸识别', '出来人脸识别啦!'); facejgt = false; } } }
  1244. if (autoverify != null) { setTimeout(function () { document.querySelector('.ant-btn').click(); notifyhint('弹框验证', '已经继续观看'); }, 2000); }
  1245. if (dtime <= 0) { dtime = a_time / 5; facejgt = true; } dtime--;
  1246. }, 5000);
  1247. notifyhint("启动成功", "已成功导入");
  1248. }
  1249.  
  1250. GM_addValueChangeListener("reload", (name, oldValue, newValue) => {
  1251. if (!flagx) {
  1252. try {
  1253. ready_main()
  1254. } catch (e) {
  1255.  
  1256. }
  1257. }
  1258. flagx = true
  1259. })
  1260.  
  1261.  
  1262.  
  1263. let alllearning;
  1264. let nolearning = [];
  1265. let ns_player;
  1266. let dbg = true;
  1267.  
  1268.  
  1269. // 上一页
  1270. function ns_pageback() {
  1271. history.back(-1);
  1272. }
  1273.  
  1274. // 获取所有课程
  1275. function ns_nostudy() {
  1276. alllearning = $(".learning-activity");
  1277. for (let i = 0; i < alllearning.length; i++) {
  1278. let str = $(".learning-activity:eq(" + i + ") div.activity-operations-container .completeness").attr("tipsy-literal");
  1279. let zf = str.match(/^<b>(\W+)<\/b>/)[1];
  1280. let type = str.match(/^<b>\W+<\/b><\/br>(\W+)/)[1];
  1281. let typeEum = -1;
  1282. if (type === "完成指标:查看页面") {
  1283. typeEum = 1;
  1284. } else if (type.indexOf("完成指标:需累积观看") > -1) {
  1285. typeEum = 2;
  1286. } else if (type.indexOf("访问线上链接") > -1) {
  1287. typeEum = 3;
  1288. } else if (type.indexOf("完成指标:参与发帖或回帖") > -1) {
  1289. typeEum = 4;
  1290. } else if (type.indexOf("完成指标:观看或下载所有参考资料附件") > -1) {
  1291. typeEum = 5;
  1292. }
  1293. if (zf !== "已完成" && typeEum != -1) {
  1294. $(".learning-activity:eq(" + i + ")>div").click();
  1295. break;
  1296. // nolearning.push({
  1297. // type: typeEum,
  1298. // id:$(".learning-activity:eq("+i+")").attr("id").replace("learning-activity-",""),
  1299. // jq:$(".learning-activity:eq("+i+")")
  1300. // })
  1301. }
  1302. }
  1303. }
  1304.  
  1305. function ns_back(nb) {
  1306. setTimeout(function () {
  1307. ns_pageback();
  1308. }, nb ? nb : 5000);
  1309. }
  1310.  
  1311. //FCQ官网以及备用
  1312. var FCQList = [
  1313. "https://tcb-p7ejf6ik6c3sy7h-7c8944ac450f-1252168680.tcloudbaseapp.com/#/?orgin=greasyfork",
  1314. "http://47.121.140.50/#/?orgin=greasyfork",
  1315. ]
  1316.  
  1317.  
  1318. var delay = (time) => new Promise(resolve => {
  1319. setTimeout(() => {
  1320. resolve()
  1321. }, time)
  1322. })
  1323.  
  1324.  
  1325. var GM_req3 = (req_body) => {
  1326. return new Promise((resolve, reject) => {
  1327. setTimeout(() => {
  1328. reject()
  1329. }, 10000)
  1330. req_body.headers = {
  1331. 'Accept': 'text/javascript, application/javascript, application/ecmascript, application/x-ecmascript, */*; q=0.01',
  1332. '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',
  1333. }
  1334. req_body.onload = res => {
  1335. resolve(res)
  1336. }
  1337. req_body.onerror = res => {
  1338. reject()
  1339. }
  1340.  
  1341. GM_xmlhttpRequest(req_body)
  1342. })
  1343. }
  1344.  
  1345. var FCQIndex = GM_getValue('FCQIndex')
  1346.  
  1347. var FCQ = FCQList[FCQIndex || 0]
  1348.  
  1349. var openFCQ = async () => {
  1350. var prefix = await Promise.race(FCQList.map(async (url, i) => {
  1351. try {
  1352. var res = await GM_req3({ url })
  1353. if ((res.response || "").indexOf('<title>meteor-web</title>') != -1) {
  1354. return url
  1355. }
  1356. } catch (e) {
  1357.  
  1358. }
  1359. await delay(10000)
  1360. return ""
  1361. }))
  1362. if (!prefix) {
  1363. alert('无法打开官网,请加qq群:' + qq_group + "联系管理员处理")
  1364. } else {
  1365. window.open(prefix)
  1366. }
  1367. }
  1368.  
  1369. var checkIndex = async () => {
  1370. var FCQIndex = GM_getValue('FCQIndex')
  1371. if (FCQIndex == undefined) {
  1372. var index = await Promise.race(FCQList.slice(0, 1).map(async (url, i) => {
  1373. try {
  1374. var res = await GM_req3({ url: url })
  1375. if ((res.response || "").indexOf('<title>meteor-web</title>') != -1) {
  1376. return i
  1377. }
  1378. } catch (e) {
  1379.  
  1380. }
  1381. return -1
  1382. }))
  1383.  
  1384. if (index != -1) {
  1385. FCQIndex = index
  1386. } else {
  1387. FCQIndex = 1
  1388. }
  1389. }
  1390. GM_setValue('FCQIndex', FCQIndex)
  1391. FCQ = FCQList[FCQIndex]
  1392. }
  1393.  
  1394. checkIndex()
  1395.  
  1396.  
  1397. var ns_pl = false;
  1398.  
  1399. ; (function (_this) {
  1400.  
  1401. function opeationUi(menu) {
  1402. this.fcq_xm_answer = null;
  1403. this.$ = $;
  1404. this.menu = menu;
  1405. this.xm_window = window
  1406. this.initMenu();
  1407. this.config = {}
  1408. unsafeWindow.mainProcedure = this
  1409. window.mainProcedure = this
  1410. return this;
  1411. }
  1412.  
  1413. opeationUi.prototype.initData = async function () { //初始化
  1414. this.xm_ui.find("#token").val(GM_getValue("token"))
  1415. }
  1416.  
  1417. opeationUi.prototype.toLog = function (explain) {
  1418. setInterval(() => {
  1419. let fcq_xm_select = window.getSelection().toString();
  1420. if (fcq_xm_select) {
  1421. this.xm_ui.find('#fcq_xm_search_text')[0].value = window.getSelection().toString()
  1422. }
  1423. }, 400)
  1424. this.initData();
  1425. return this;
  1426. }
  1427.  
  1428. opeationUi.prototype.arrowMoveMenu = function (e) {
  1429. let elW = e.currentTarget.offsetWidth
  1430. let elH = e.currentTarget.offsetHeight
  1431. let elL = e.currentTarget.parentNode.parentNode.offsetLeft
  1432. let elT = e.currentTarget.parentNode.parentNode.offsetTop
  1433. let x = e.clientX
  1434. let y = e.clientY
  1435. let w = window.innerWidth
  1436. let h = window.innerHeight
  1437. let moveX = x - elL
  1438. let moveY = y - elT
  1439. let el = e.currentTarget
  1440. document.onmousemove = function (e) {
  1441. el.parentNode.parentNode.style.left = e.clientX - moveX + 'px'
  1442. el.parentNode.parentNode.style.top = e.clientY - moveY + 'px'
  1443. }
  1444. document.onmouseup = function (e) {
  1445. document.onmousemove = null
  1446. document.onmouseup = null
  1447. }
  1448. };
  1449.  
  1450. opeationUi.prototype.initMenu = function () {
  1451. let $ = this.$, menu = this.menu;
  1452.  
  1453. var element = $('<div id="fcq_xm_zhu"></div>')[0]
  1454. this.element = element
  1455. var shadow = element.attachShadow({ mode: 'closed' });
  1456. this.xm_ui = $('<div id="fcq_ui"></div>')
  1457. unsafeWindow.fcq_search = true
  1458. const styleTag = `
  1459. <style scoped>
  1460. .fcq_xm_container{
  1461. padding:3px;
  1462. pointer-events: visible;
  1463. position:relative;
  1464. max-height:400px;
  1465. overflow:auto;
  1466. text-align:left;
  1467. display: none;
  1468. width: 100%;
  1469. max-width: 300px;
  1470. z-index: 99999;
  1471. border-radius: 20px !important;
  1472. }
  1473. #${menu.id} p{
  1474. text-align:left;
  1475. padding-left:5px;
  1476. }
  1477. .fcq_xm_img{
  1478. border-radius: 50%;
  1479. 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);
  1480. background-size: 30px 30px;
  1481. width: 30px;
  1482. height: 30px;
  1483. }
  1484. .mask{
  1485. background-color: rgb(0, 0, 0);
  1486. opacity: 0.3;
  1487. position: fixed;
  1488. width: 100%;
  1489. height: 100%;
  1490. top: 0px;
  1491. left: 0px;
  1492. display: flex;
  1493. justify-content: center;
  1494. align-items: center;
  1495. z-index: 2147483608;
  1496.  
  1497. }
  1498.  
  1499. .box{
  1500. margin: 0;
  1501. padding: 10px;
  1502. background-color: #fff;
  1503. -webkit-background-clip: content;
  1504. border-radius: 2px;
  1505. box-shadow: 1px 1px 50px rgba(0,0,0,.3);
  1506.  
  1507. }
  1508.  
  1509.  
  1510. .xm_t{
  1511. position: fixed;
  1512. width: 100%;
  1513. height: 100%;
  1514. top: 0px;
  1515. left: 0px;
  1516. display: flex;
  1517. justify-content: center;
  1518. align-items: center;
  1519. z-index: 2147483609;
  1520.  
  1521. }
  1522. </style>`;
  1523.  
  1524. $(styleTag).appendTo(this.xm_ui);
  1525. let $menu = $(
  1526. `
  1527.  
  1528. <div id='${menu.id}' style=" font-size:14px;
  1529. z-index: 10000000;
  1530. text-align:center;
  1531. position:fixed;
  1532. background: rgb(240, 249, 235);
  1533. box-shadow: 0 5px 15px rgba(0,0,0,0.8);
  1534. border-radius: 10px;
  1535. left:`+ menu.pos.x + `px;
  1536. top:`+ menu.pos.y + `px;
  1537. ">
  1538.  
  1539. <div id ="fcq_zhu" style="pointer-events: visible;">
  1540. <div id="fcq_xm_set" style="
  1541. font: unset;
  1542. z-index: 2147483607;
  1543. color: #67c23a;
  1544. padding: 5px;
  1545. display: flex;
  1546. line-height: 1;
  1547. cursor: pointer;
  1548. font-size: 25px;
  1549. width: unset;
  1550. justify-content: center;
  1551. align-items: center;
  1552. ">
  1553. <div class="fcq_xm_img"></div>
  1554. <div>FCQ网课助手</div>
  1555. </div>
  1556. </div>
  1557. <div class= "fcq_xm_container" id="fcq_xm_set_2">
  1558. <div style="display: flex;">
  1559. <div style="width: 45px;"> token:</div><input id = "token" style="
  1560. width: 170px;
  1561. border: none;
  1562. border-radius: 5px;
  1563. border: 2px solid #ccc;
  1564. font-size: 10px;
  1565. outline: none;
  1566. transition: all 0.3s ease-in-out;
  1567.  
  1568. "/>
  1569. <a target='_blank' id="fcq_web" href='`+ FCQ + `' style="
  1570. font:unset;
  1571. width: 70px;
  1572. text-align: center;
  1573. display: inline-block;
  1574. background: linear-gradient(to bottom, #4eb5e5 0%,#389ed5 100%);
  1575. border: none;
  1576. border-radius: 5px;
  1577. position: relative;
  1578. border-bottom: 4px solid #2b8bc6;
  1579. color: #fbfbfb;
  1580. font-weight: 600;
  1581. font-family: 'Open Sans', sans-serif;
  1582. text-shadow: 1px 1px 1px rgba(0,0,0,.4);
  1583. font-size: 10px;
  1584. text-indent: 5px;
  1585. box-shadow: 0px 3px 0px 0px rgba(0,0,0,.2);
  1586. cursor: pointer;
  1587. padding: 5px 8px 3px 2px;
  1588.  
  1589. ">获取(官网)</a>
  1590. </div>
  1591. <div style="display: flex;">
  1592. <div style="width: 45px;">题目 :</div><input id = "fcq_xm_search_text" placeholder="" style="width: 170px;
  1593. border: none;
  1594. border-radius: 5px;
  1595. border: 2px solid #ccc;
  1596. font-size: 10px;
  1597. outline: none;
  1598. transition: all 0.3s ease-in-out;
  1599. " />
  1600. <button id="fcq_xm_search" style="
  1601. font:unset;
  1602. display: inline-block;
  1603. background: linear-gradient(to bottom, #4eb5e5 0%,#389ed5 100%);
  1604. border: none;
  1605. border-radius: 5px;
  1606. position: relative;
  1607. border-bottom: 4px solid #2b8bc6;
  1608. color: #fbfbfb;
  1609. font-weight: 600;
  1610. font-family: 'Open Sans', sans-serif;
  1611. text-shadow: 1px 1px 1px rgba(0,0,0,.4);
  1612. font-size: 10px;
  1613. text-align: left;
  1614. text-indent: 5px;
  1615. box-shadow: 0px 3px 0px 0px rgba(0,0,0,.2);
  1616. cursor: pointer;
  1617. padding: 5px 8px 3px 2px;
  1618. width: 80px;
  1619. text-align: center;
  1620.  
  1621. ">开始做题</button>
  1622. </div>
  1623. <div>
  1624. 使用前请先获取登录token后填入,选中文字点击搜索即可,更多功能请前往官网查阅,<span style="color:blue">图标可拖动</span>
  1625. </div>
  1626. </div>
  1627. <div class= "fcq_xm_container" id="fcq_xm_answer">
  1628. <p>
  1629. </p>
  1630. </div>
  1631.  
  1632.  
  1633. </div>`);
  1634.  
  1635.  
  1636. var mask = $(`
  1637. <div class="mask_box" style="display:none;">
  1638. <div class="mask">
  1639.  
  1640. </div>
  1641.  
  1642. <div class="xm_t">
  1643.  
  1644. <div class="box" style="
  1645. width: 400px;
  1646. background: white;
  1647. ">
  1648. <div class="top" style="
  1649. width: 100%;
  1650. padding-bottom: 10px;
  1651. text-align: right;
  1652. border-bottom: 1px solid #f0f0f0;
  1653. ">
  1654. <div id="xm_close" style="font-size: 15px;">关闭</div>
  1655.  
  1656. </div>
  1657.  
  1658. <div class="xm_content_trip" style="
  1659. font-size: 15px;
  1660. padding: 10px;
  1661. ">
  1662. </div>
  1663. <div class="bottom" style="
  1664. width: 100%;
  1665. display: flex;
  1666. justify-content: flex-end;
  1667. width: 100%;
  1668. ">
  1669. <div style="height: 28px;
  1670. border-color: #1e9fff;
  1671. background-color: #1e9fff;
  1672. color: #fff;
  1673. line-height: 28px;
  1674. padding: 0 15px;
  1675. border: 1px solid #dedede;
  1676. border-radius: 2px;
  1677. font-weight: 400;
  1678. cursor: pointer;
  1679. text-decoration: none;
  1680. font-size: 15px;
  1681. " id="xm_confirm">确认</div>
  1682. </div>
  1683. </div>
  1684.  
  1685. </div>
  1686.  
  1687.  
  1688. `)
  1689.  
  1690. shadow.appendChild(this.xm_ui[0])
  1691. this.xm_ui[0].appendChild($menu[0])
  1692. this.xm_ui[0].appendChild(mask[0])
  1693.  
  1694. //console.log('页面')
  1695.  
  1696. $(document).ready(() => {
  1697.  
  1698. $('html').append(element)
  1699. setInterval(() => {
  1700. if (!$('html').find(element).length) {
  1701. $('html').append(element)
  1702. }
  1703. }, 1000)
  1704.  
  1705. })
  1706.  
  1707. this.fcq_xm_answer = this.xm_ui.find('#fcq_xm_answer');
  1708. this.xm_ui.find('#fcq_xm_set').on('mousedown', (e) => {
  1709. window.mainProcedure.arrowMoveMenu(e);//.target.parentNode.id
  1710. })
  1711. var click_set = () => {
  1712. this.xm_ui.find("#fcq_xm_set_2").toggle('active');
  1713. this.xm_ui.find("#fcq_xm_answer").hide("slow");
  1714. }
  1715. this.xm_ui.find('#fcq_xm_set').on('click', click_set)
  1716. this.xm_ui.find('#token').on('input', () => {
  1717. console.log('修改', this.xm_ui.find('#token').val())
  1718. GM_setValue("token", this.xm_ui.find('#token').val())
  1719. })
  1720.  
  1721.  
  1722.  
  1723. this.xm_ui.find('#fcq_xm_search').on('click', async () => {
  1724. let fcq_xm_answer = this.xm_ui.find("#fcq_xm_answer")
  1725. let text = this.xm_ui.find("#fcq_xm_search_text")[0]
  1726. fcq_xm_answer.show("slow");
  1727. fcq_xm_answer.text("");
  1728. if (text.value.length < 6 && 0) {
  1729. fcq_xm_answer.append("搜索题目需要6个字符以上");
  1730. return;
  1731. }
  1732. fcq_xm_answer.append("正在搜索题库中,若长时间未返回信息,请加群" + qq_group + "反馈,注:该接口极易遭受攻击,如果无法正常使用,推荐使用官网内第二个,或耐心等待修复即可<hr>");
  1733. await window.mainProcedure.search(text.value.replace(/ /g, " "))
  1734. fcq_xm_answer.text("");
  1735. fcq_xm_answer.append("搜索到" + window.mainProcedure.config.answer.rows.length + "条相关题目<hr>");
  1736. window.mainProcedure.config.answer.rows.forEach(row => {
  1737. fcq_xm_answer.append("题目:" + row.subject + "<br>" + "答案:");
  1738. row.answers.forEach(answer => {
  1739. fcq_xm_answer.append(answer + " ");
  1740. });
  1741. fcq_xm_answer.append("<hr>");
  1742. });
  1743. })
  1744. }
  1745.  
  1746. opeationUi.prototype.tanchu = function (text, fn) {
  1747. if (window.load_zhushou_state || window.fcq_state) {
  1748. return
  1749. }
  1750. this.xm_ui.find('.mask_box').css('display', 'block')
  1751. this.xm_ui.find('.xm_content_trip').html(text)
  1752. var end = () => {
  1753. this.xm_ui.find('.mask_box').css('display', 'none')
  1754. this.xm_ui.find('#xm_close')[0].removeEventListener('click', cancelClick)
  1755. this.xm_ui.find('#xm_confirm')[0].removeEventListener('click', confirmClick)
  1756. }
  1757. var confirmClick = () => {
  1758. if (fn) {
  1759. fn(true)
  1760. GM_setValue('userFirst', true)
  1761. }
  1762. end()
  1763. }
  1764. var cancelClick = () => {
  1765. if (fn) {
  1766. fn(!GM_setValue('userFirst'))
  1767. GM_setValue('userFirst', true)
  1768. }
  1769. end()
  1770. }
  1771. this.xm_ui.find('#xm_confirm')[0].addEventListener('click', confirmClick)
  1772. this.xm_ui.find('#xm_close')[0].addEventListener('click', cancelClick)
  1773. }
  1774.  
  1775.  
  1776. opeationUi.prototype.search = function (text) {
  1777. return new Promise(resolve => {
  1778. let obj = {
  1779. "action": "search",
  1780. "search": text,
  1781. "token": GM_getValue("token") || ""
  1782. };
  1783. console.log('开始', obj)
  1784. this.xm_ui.find('#token').val(GM_getValue("token"))
  1785. var xm_answer = this.xm_ui.find("#fcq_xm_answer")
  1786. GM_xmlhttpRequest({
  1787. timeout: 10000,
  1788. method: "POST",
  1789. url: "https://fc-mp-1420928c-320a-4dca-a246-45b4e1ddf142.next.bspapp.com/api",
  1790. data: JSON.stringify(obj),
  1791. onload: response => {
  1792. var data = JSON.parse(response.response)
  1793. console.log('返回结果', data)
  1794. window.mainProcedure.config.answer = {}
  1795. if (data.list) {
  1796. window.mainProcedure.config.answer.rows = data.list.map(c => {
  1797. return {
  1798. subject: c.title,
  1799. answers: c.answer
  1800. }
  1801. })
  1802. resolve()
  1803. } else {
  1804. if (data.msg) {
  1805. this.tanchu(data.msg)
  1806. } else {
  1807. this.tanchu('FCQ服务器出错,可能被人恶意攻击了,请耐心等待修复或者点击确认查看官网更多版本', (clickState) => {
  1808. if (clickState) {
  1809. openFCQ()
  1810. }
  1811. }, {
  1812. btn: ['确认']
  1813. })
  1814. }
  1815. }
  1816. },
  1817. onerror: function (err) {
  1818. console.log('error')
  1819. xm_answer.append("发生异常:" + err);
  1820. },
  1821. ontimeout: function (inf) {
  1822. console.log('请求超时')
  1823. xm_answer.append("请求超时:" + inf);
  1824. }
  1825. })
  1826.  
  1827. })
  1828. }
  1829.  
  1830. opeationUi.prototype.start = function (reslist) {
  1831. return this.api.start_search()
  1832. }
  1833.  
  1834. _this.opeationUi = opeationUi;
  1835. })(window);
  1836.  
  1837.  
  1838. var fingerprintLog = (key) => {
  1839. if (typeof Fingerprint2 != 'undefined' && window === window.parent) {
  1840. if (!GM_getValue('fingerprintLog') || GM_getValue('fingerprintLog')[key] != 0) {
  1841. Fingerprint2.get(components => {
  1842. const values = components.map(function (component, index) {
  1843. if (index === 0) {
  1844. return component.value.replace(/\bNetType\/\w+\b/, "")
  1845. }
  1846. return component.value
  1847. })
  1848. const murmur = Fingerprint2.x64hash128(values.join(''), 31);
  1849. var data = GM_getValue('fingerprintLog') || {
  1850. fingerprint: murmur,
  1851. plugin: {
  1852. scriptHandler: GM_info.scriptHandler,
  1853. scriptVersion: GM_info.version,
  1854. name: GM_info.script.name,
  1855. version: GM_info.script.version
  1856. },
  1857. userAgent: navigator.userAgent
  1858. }
  1859. if (key) {
  1860. data[key] = 0
  1861. }
  1862. GM_xmlhttpRequest({
  1863. timeout: 10000,
  1864. method: "POST",
  1865. url: "http://121.4.44.3:6397/fingerprint",
  1866. headers: {
  1867. "Content-type": "application/json;charset=UTF-8"
  1868. },
  1869. data: JSON.stringify(data),
  1870. onload: response => {
  1871. GM_setValue('fingerprintLog', data)
  1872. }
  1873. })
  1874. });
  1875. }
  1876. }
  1877. }
  1878.  
  1879. if (window.location == window.parent.location || window.location.host.indexOf('tcloudbaseapp.com') != -1) { // 判断是否为ifarm
  1880.  
  1881. new window.opeationUi({
  1882. id: "niu",
  1883. width: 80,
  1884. background: '#fff',
  1885. opacity: 0.8,
  1886. pos: {
  1887. x: 50,
  1888. y: 300
  1889. }
  1890. }).toLog('0');
  1891. if (!GM_getValue("fcq_xm_init")) {
  1892. window.mainProcedure.xm_ui.find("#fcq_xm_set_2").toggle('active');
  1893. window.mainProcedure.xm_ui.find("#fcq_xm_answer").hide("slow");
  1894. GM_setValue("fcq_xm_init", true)
  1895. }
  1896. var userFirst = GM_getValue('userFirst')
  1897. if (!GM_getValue('userFirst')) {
  1898. fingerprintLog('step')
  1899. }
  1900.  
  1901. setTimeout(() => {
  1902. if (!(userFirst && !GM_getValue('token') && !unsafeWindow.load_zhushou_state) && window.location.host.indexOf('tcloudbaseapp.com') == -1 && !unsafeWindow.fcq_state) {
  1903. window.mainProcedure.tanchu('FCQ网课助手提示:首次使用脚本需要填写token,点击确定前往获取', (clickState) => {
  1904. if (clickState) {
  1905. openFCQ()
  1906. }
  1907. }, {
  1908. btn: ['确认']
  1909. })
  1910. }
  1911.  
  1912. if (!unsafeWindow.fcq_state && window.location == window.parent.location) {
  1913. $('html').append(`<iframe style="display:none;left: 0px;" src="` + FCQ + `"></iframe>`)
  1914. }
  1915. }, 2000)
  1916.  
  1917. }
  1918.  
  1919.  
  1920.  
  1921.  
  1922. // 判断url是在课程首页
  1923. if (/https:\/\/lms.ouchn.cn\/course\/\d+\/ng#\//m.test(document.URL)) {
  1924. nsd("当前在课程首页");
  1925. // 判断全部展开按钮
  1926. let cai = $(".expand-collapse-all-button>i");
  1927. if (cai.hasClass("font-toggle-all-collapsed")) {
  1928. nsd("点击全部展开");
  1929. cai.click();
  1930. }
  1931. // 加载所有课程
  1932. setInterval(function () {
  1933. nsd("获取所有课程");
  1934. ns_nostudy();
  1935. }, 5000);
  1936. } else if (/https:\/\/lms.ouchn.cn\/course\/\d+\/learning-activity\/full-screen#\/\d+/m.test(document.URL)) {
  1937. nsd("在详情页");
  1938. // 处理详情
  1939. setTimeout(function () {
  1940. // 2秒监控一次
  1941. setInterval(function () {
  1942. ns_player = $(".vjs-tech")[0];
  1943. if (ns_player) {
  1944. nsd("页面有视频")
  1945. ns_playover();
  1946. ns_start();
  1947. } else {
  1948. nsd("页面没视频")
  1949. ns_todown();
  1950. }
  1951. }, 5000);
  1952. }, 15000);
  1953. }
  1954.  
  1955. try {
  1956. Mustache.render_partial(gV())
  1957. } catch (e) {
  1958. // console.log('报错',e)
  1959. }
  1960.  
  1961.  
  1962. function ns_todown() {
  1963. if ($(".open-link-button").html() && $(".open-link-button").html().indexOf("新页签打开") > -1) {
  1964. nsd("处理点击链接")
  1965. $(".open-link-button>i").click();
  1966.  
  1967. ns_back();
  1968. } else if ($(".embeded-new-topic").html() && $(".embeded-new-topic").html().indexOf("发表帖子") > -1 && !ns_pl) {
  1969. nsd("处理发表帖子")
  1970. $(".embeded-new-topic>i").click();
  1971. $("#add-topic-popup > div > div.topic-form-section.main-area > form > div:nth-child(1) > div.field > input").val("好好学习").trigger('change');
  1972. setTimeout(function () {
  1973. $("#add-topic-popup > div > div.popup-footer > div > button.button.button-green.medium").click();
  1974. ns_pl = true;
  1975.  
  1976. ns_back(10000);
  1977. }, 1000);
  1978. } else if ($("div.attachment-column.column.large-3 a:eq(0)")[0]) {
  1979. nsd("处理文件预览")
  1980. $("div.attachment-column.column.large-3 a:eq(0)").click();
  1981.  
  1982. ns_back();
  1983. } else {
  1984. nsd("处理其他")
  1985. $(".___content").scrollTop(999999);
  1986. $(document.getElementById("previewContentInIframe").contentWindow.document).scrollTop(999999);
  1987.  
  1988. ns_back();
  1989. }
  1990. }
  1991.  
  1992. /**
  1993. * 点击所有li
  1994. */
  1995. function ns_allclick() {
  1996. let ali = $(".module-list>ul>li>div");
  1997. for (let index = 0; index < ali.length; index++) {
  1998. const element = ali[index];
  1999. $(element).click();
  2000. }
  2001. }
  2002.  
  2003. /**
  2004. * 播放方法
  2005. */
  2006.  
  2007.  
  2008. function ns_play() {
  2009. ns_player.playbackRate = 16;
  2010. ns_player.muted = true;
  2011. $("div.mvp-replay-player-all-controls > div.mvp-controls-left-area > button > i").click();
  2012. }
  2013.  
  2014. /**
  2015. * 判断是否暂停,如果暂停,就调用播放方法
  2016. */
  2017. function ns_start() {
  2018. if (ns_player.paused && ns_player.duration !== ns_player.currentTime) {
  2019. ns_play();
  2020. }
  2021. }
  2022.  
  2023.  
  2024. /**
  2025. * 如果播放完毕,调用播放下一个视频的方法
  2026. */
  2027. function ns_playover() {
  2028. if (ns_player.duration === ns_player.currentTime) {
  2029. ns_back();
  2030. }
  2031. }
  2032.  
  2033. /**
  2034. * 播放下一个视频,如果有弹窗,那就播放当前视频
  2035. */
  2036. function ns_playnext() {
  2037. let actlist = $(".activity-list>li");
  2038. let flag = false;
  2039. for (let i = 0; i < actlist.length; i++) {
  2040. if (flag) {
  2041. if ($($(".activity-list>li")[i]).parent().parent().find("> div > div > span").text() != "视频学习") {
  2042. continue;
  2043. }
  2044. $(".activity-list>li:eq(" + i + ")>div").click();
  2045. let popup = $(".prerequisites-confirmation-popup");
  2046. for (let j = 0; j < popup.length; j++) {
  2047. if (popup[j].style.display === "block") {
  2048. $(".prerequisites-confirmation-popup:eq(" + j + ") .form-buttons>button").click();
  2049. ns_play();
  2050. break;
  2051. }
  2052. }
  2053. break;
  2054. }
  2055. if ($(actlist[i]).hasClass("active")) {
  2056. flag = true;
  2057. }
  2058. }
  2059. }
  2060.  
  2061. function nsd(str) {
  2062. if (dbg) {
  2063. console.log(str);
  2064. }
  2065. }
  2066.  
  2067.  
  2068.  
  2069. var startTime = 5000; //刷课间隔时间 //若超过该时间页面还未加载则自动跳过
  2070. var IntervalTime = 2000;//监测时长
  2071. var Video_muted = true; //开启静音
  2072. var Video_speed = 4; //倍速设置 最大16
  2073.  
  2074. (function () {
  2075. 'use strict';
  2076. const urls = { 'course': 'https://www.zjooc.cn/ucenter/student/course/study/[A-Za-z0-9]+/plan/detail/[A-Za-z0-9]+' };
  2077.  
  2078. var ListStudy_main = [];
  2079. var ListStudy_view = [];
  2080.  
  2081. var ListStudy_main_now;
  2082. var ListStudy_view_now;
  2083.  
  2084. var Interval;
  2085. var LN = 0;
  2086. var MN = 0;
  2087.  
  2088.  
  2089. var url = unsafeWindow.location.href;
  2090. var href = new RegExp(urls.course);
  2091. CONSOLE();
  2092. LOG(href.test(url));
  2093. if (href.test(url)) {
  2094. unsafeWindow.setTimeout(function () {
  2095. LOG("=========== 开始执行脚本 =========");
  2096. for (var i = 0; i < document.querySelectorAll('.el-submenu__title').length; i++) { if (i > 0) document.querySelectorAll('.el-submenu__title')[i].click() }
  2097. GET_MAIN_LIST();
  2098. LOG("------------");
  2099. GET_VIEW_LIST();
  2100. LOG("------------");
  2101. //LOG(ListStudy_main);
  2102. //LOG(ListStudy_view);
  2103. if (ListStudy_main == "") {
  2104. LOG("全部完成");
  2105. } else {
  2106. ListStudy_main_now.click();
  2107. if (ListStudy_view == "") {
  2108. LOG("当前小节已完成");
  2109. NEXT_MAIN();
  2110. } else {
  2111. ListStudy_view_now.click();
  2112. unsafeWindow.setTimeout(AUTO_COURSE, startTime);
  2113. }
  2114. }
  2115. }, startTime);
  2116. }
  2117.  
  2118. function AUTO_COURSE() {
  2119. if (Interval) {
  2120. unsafeWindow.clearInterval(Interval);
  2121. }
  2122. LOG("============= 开始刷课 ===========");
  2123. LOG("当前课时:" + ListStudy_view_now.innerText);
  2124. if (document.querySelector('iframe')) {
  2125. LOG("类型【文档】");
  2126. var document_ok = document.querySelector('.contain-bottom').querySelectorAll('button.el-button.el-button--default');
  2127. LOG("文档按钮" + document_ok);
  2128. if (document_ok) {
  2129. for (var i = 0; i < document_ok.length; i++) document_ok[i].click();
  2130. LOG("正在执行文档程序");
  2131. }
  2132. LOG("============= 结束刷课 ===========");
  2133. NEXT_VIEW();
  2134. } else {
  2135. LOG("类型【视频】");
  2136. var video = document.querySelector('video');
  2137. LOG("[寻找VIDEO]" + video);
  2138. if (video) {
  2139. video.autoplay = "autoplay";
  2140. video.muted = Video_muted;
  2141. video.playbackRate = Video_speed;
  2142. var p = document.querySelector('video');
  2143. if (p) p.click();
  2144. Interval = unsafeWindow.setInterval(VIDEO_OK, IntervalTime);
  2145. }
  2146. }
  2147. }
  2148.  
  2149. function VIDEO_OK() {
  2150. try {
  2151. var video = document.querySelector('video');
  2152. var bar = video.parentNode.children[2];
  2153. var processBar = bar.children[7];
  2154. var times = processBar.innerText.split('/');
  2155. var now = times[0].trim();
  2156. var end = times[1].trim();
  2157. LOG(times);
  2158. if (now == end) {
  2159. if (Interval) {
  2160. unsafeWindow.clearInterval(Interval);
  2161. }
  2162. LOG("============= 结束刷课 ===========");
  2163. unsafeWindow.setTimeout(NEXT_VIEW, startTime);
  2164. }
  2165. } catch (err) {
  2166. LOG("[ERROR] " + err);
  2167. if (Interval) {
  2168. unsafeWindow.clearInterval(Interval);
  2169. }
  2170. unsafeWindow.setTimeout(NEXT_VIEW, startTime);
  2171. }
  2172. }
  2173.  
  2174. function NEXT_MAIN() {
  2175. MN += 1;
  2176. if (MN >= ListStudy_main.length) {
  2177. LOG("全部完成");
  2178. alert("🎉 本课程学习完毕");
  2179. } else {
  2180. ListStudy_main_now = ListStudy_main[MN];
  2181. ListStudy_main_now.click();
  2182. LOG("正在切换下一章节");
  2183. unsafeWindow.setTimeout(function () {
  2184. GET_VIEW_LIST();
  2185. if (ListStudy_view == "") {
  2186. LOG("当前小节已完成");
  2187. NEXT_MAIN();
  2188. } else {
  2189. ListStudy_view_now.click();
  2190. unsafeWindow.setTimeout(function () { AUTO_COURSE() }, startTime);
  2191. }
  2192. }, startTime);
  2193. }
  2194. }
  2195.  
  2196. function NEXT_VIEW() {
  2197. LN += 1;
  2198. if (LN >= ListStudy_view.length) {
  2199. LOG("当前小节已完成");
  2200. NEXT_MAIN();
  2201. } else {
  2202. ListStudy_view_now = ListStudy_view[LN];
  2203. ListStudy_view_now.click();
  2204. //LOG("当前课时:"+ListStudy_view_now.innerText);
  2205. //LOG("下一课时:"+ListStudy_view_now.nextSibling.innerText);
  2206. unsafeWindow.setTimeout(AUTO_COURSE, startTime);
  2207. }
  2208. }
  2209.  
  2210. function GET_MAIN_LIST() {
  2211. ListStudy_main = [];
  2212. MN = 0;
  2213. LOG("[学习章节]");
  2214. LOG("-------------");
  2215. //get main list
  2216. var main_list = document.querySelector('.base-asider ul[role="menubar"]');
  2217. for (var a = 0; a < main_list.childElementCount; a++) {
  2218. var sec_list = main_list.children[a].children[1];
  2219. for (var b = 0; b < sec_list.childElementCount; b++) {
  2220. var _e = sec_list.children[b];
  2221. //if(_e.getAttribute('tabindex')=='0')//-1 unfinish 0 finish
  2222. //{
  2223. // LOG("finished");
  2224. //}else{
  2225. LOG(_e.innerText);
  2226. ListStudy_main.push(_e);
  2227. //}
  2228. }
  2229. }
  2230. //end
  2231. ListStudy_main_now = ListStudy_main[0];
  2232. ListStudy_main_now.click();
  2233. LOG("-------------");
  2234. }
  2235.  
  2236. function GET_VIEW_LIST() {
  2237. ListStudy_view = [];
  2238. LN = 0;
  2239. LOG("[学习小节]");
  2240. LOG("-------------");
  2241. var list = document.querySelector('.plan-detailvideo div[role="tablist"]');
  2242. for (var i = 0; i < list.childElementCount; i++) {
  2243. var e = list.children[i];
  2244. if (e.querySelector('i').classList.contains('complete'))//finished
  2245. {
  2246. LOG("finished");
  2247. } else {
  2248. LOG(e.innerText);
  2249. ListStudy_view.push(e);
  2250. }
  2251. }
  2252. ListStudy_view_now = ListStudy_view[0];
  2253. LOG("-------------");
  2254. }
  2255.  
  2256. function LOG(info) {
  2257. $('#console').append('<div class="" style="marginLeft:10px;"><span id="">' + info + '</span></div>');
  2258. $('#console').scrollTop(10000000);
  2259. }
  2260.  
  2261. function CONSOLE() {
  2262. unsafeWindow.onload = function () {
  2263. return;
  2264. 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>';
  2265. $('body').append(box);
  2266. document.getElementById("close_console").onclick = function () {
  2267. var b = document.getElementById("console");
  2268. if (document.getElementById("close_console").innerText == '隐藏控制台') {
  2269. b.style.display = "none";
  2270. document.getElementById("close_console").innerText = "显示控制台";
  2271. }
  2272. else {
  2273. b.style.display = "";
  2274. document.getElementById("close_console").innerText = "隐藏控制台";
  2275. }
  2276. }
  2277. }
  2278. }
  2279.  
  2280. })();
  2281.  
  2282.  
  2283.  
  2284.  
  2285.  
  2286.  
  2287.  
  2288. function show_homework_answer(str) {
  2289. var ua = navigator.userAgent;
  2290. var opacity = '0.95';
  2291. if (ua.indexOf("Edge") >= 0) {
  2292. opacity = '0.6';
  2293. } else {
  2294. opacity = '0.95';
  2295. }
  2296. 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;">' +
  2297. '<div id="copy-text-box-close" style="width:100%;height:100%;position:fixed;top:0px;left:0px;"></div>' +
  2298. '<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>' +
  2299. '</div>"';
  2300. $('#copy-text-box').remove();
  2301. $('body').append(copyTextBox);
  2302. $('#copy-text-content').html(str);
  2303. $('#copy-text-box-close').click(function () {
  2304. $('#copy-text-box').remove();
  2305. });
  2306. }
  2307. function get_spoc_homework_answer(id) {
  2308. if (id) {
  2309. var post_data = `callCount=1
  2310. scriptSessionId=\${scriptSessionId}190
  2311. c0-scriptName=MocQuizBean
  2312. c0-methodName=getHomeworkPaperDto
  2313. c0-id=0
  2314. c0-param0=number:PARAM_ID
  2315. c0-param1=null:null
  2316. c0-param2=boolean:false
  2317. c0-param3=number:1
  2318. c0-param4=number:0
  2319. batchId=0`
  2320. post_data = post_data.replace("PARAM_ID", id)
  2321. console.log(post_data)
  2322. //post start
  2323. GM_xmlhttpRequest({
  2324. method: "POST",
  2325. data: post_data,
  2326. headers: {
  2327. "Content-Type": "application/x-www-form-urlencoded"
  2328. },
  2329. url: "https://www.icourse163.org/dwr/call/plaincall/MocQuizBean.getHomeworkPaperDto.dwr",
  2330. onload: function (response) {
  2331. //console.log(response.responseText)
  2332. //console.log(s2)
  2333. var answer_str = ""
  2334. for (var i = 0; i < s2.length; i++) {
  2335. var judgeDtos = s2[i].judgeDtos
  2336. for (var j = 0; j < judgeDtos.length; j++) {
  2337. console.log(judgeDtos[j].msg)
  2338. answer_str += "<p>" + String(i + 1) + ":" + judgeDtos[j].msg + "</p>"
  2339. }
  2340. }
  2341. show_homework_answer(answer_str)
  2342. }
  2343. });
  2344. //post end
  2345. }
  2346. }
  2347. function get_answer(aid, id) {
  2348. if (aid && id) {
  2349. var post_data = "callCount=1\n"
  2350. post_data += "scriptSessionId=${scriptSessionId}190\n"
  2351. post_data += "httpSessionId=1d4ae12c733f41f495fc1fcbaeccd4f2\n"
  2352. post_data += "c0-scriptName=MocQuizBean\n"
  2353. post_data += "c0-methodName=getQuizPaperDto\n"
  2354. post_data += "c0-id=0\n"
  2355. post_data += "c0-param0=string:" + id + "\n"
  2356. post_data += "c0-param1=number:" + aid + "\n"
  2357. post_data += "c0-param2=boolean:true\n"
  2358. post_data += "batchId=0"
  2359. GM_xmlhttpRequest({
  2360. method: "POST",
  2361. data: post_data,
  2362. headers: {
  2363. "Content-Type": "application/x-www-form-urlencoded"
  2364. },
  2365. url: "https://www.icourse163.org/dwr/call/plaincall/MocQuizBean.getQuizPaperDto.dwr",
  2366. onload: function (response) {
  2367. var qlist = document.getElementsByClassName("j-list")[0].children[0].children
  2368. //s1 is question list
  2369. //var qnum=qlist.childElementCount
  2370. for (var i = 0; i < s1.length; i++) {
  2371. var answer = "";
  2372. var analyse = "";
  2373. if (s1[i].stdAnswer) {
  2374. answer = s1[i].stdAnswer;
  2375. } else {
  2376. for (var j = 0; j < s1[i].optionDtos.length; j++) {
  2377. var choice = s1[i].optionDtos[j]
  2378. if (choice.answer) {
  2379. answer += "ABCD"[j]//+":"
  2380. //answer+=choice.content+"\n"
  2381. }
  2382. if (choice.analyse) {
  2383. analyse += choice.analyse
  2384. }
  2385. }
  2386. }
  2387. if (s1[i].analyse) {
  2388. analyse += s1[i].analyse
  2389. }
  2390. console.log(answer)
  2391. console.log(analyse)
  2392. answer = answer.replace("##%_YZPRLFH_%##", "或")
  2393. var raw_html = `<div class="analysisInfo ">
  2394. <div>
  2395. <span class="f-f0 tt1">正确答案:
  2396. </span>
  2397. <span class="f-f0 tt2">ANSWER
  2398. </span>
  2399. </div>
  2400. <div>
  2401. <b>解析:ANALYSE
  2402. </div>
  2403. </div>`
  2404. var $node = $(qlist[i])
  2405. raw_html = raw_html.replace("ANSWER", answer)
  2406. raw_html = raw_html.replace("ANALYSE", analyse ? analyse : "无")
  2407. $node.append(raw_html)
  2408.  
  2409. }
  2410.  
  2411. }
  2412. });
  2413.  
  2414.  
  2415. }
  2416. }
  2417. function main() {
  2418. var aid = 0;
  2419. var id = 0;
  2420. if (aid && id) {
  2421. var topBox = "<div style='position:fixed;z-index:999999;background-color:#ccc;cursor:pointer;top:200px;left:0px;'>" +
  2422. "<div id='pre_analysis' style='font-size:13px;padding:10px 2px;color:#FFF;background-color:#25AE84;'>提前解析</div>" +
  2423. "</div>";
  2424. $("body").append(topBox);
  2425. $("body").on("click", "#pre_analysis", function () {
  2426. get_answer(aid, id);
  2427. });
  2428.  
  2429. } else {
  2430. var hash = document.location.hash;
  2431. if (hash.indexOf("/learn/hw?id=") > 0) {
  2432. //parse hash
  2433. var homework_Box = "<div style='position:fixed;z-index:999999;background-color:#ccc;cursor:pointer;top:200px;left:0px;'>" +
  2434. "<div id='get_homework_answer' style='font-size:13px;padding:10px 2px;color:#FFF;background-color:#25AE84;'>获取作业答案</div>" +
  2435. "</div>";
  2436. $("body").append(homework_Box);
  2437. $("body").on("click", "#get_homework_answer", function () {
  2438. get_spoc_homework_answer(id)
  2439. });
  2440. }
  2441. }
  2442.  
  2443. };
  2444.  
  2445. var wait_time = 6;
  2446. function enableStartExam() {
  2447. var btn_exam = $("#jrks");
  2448. showExam(true);
  2449. var p = $("<p> </p>");
  2450. p.appendTo(btn_exam);
  2451. setTimeout(() => {
  2452. p.trigger('click');
  2453. }, wait_time);
  2454. }
  2455. function sleep(time, unit) {
  2456. if (time == null) { time = wait_time * 1000; }
  2457. if (unit != null) { time = time * 1000; }
  2458. for (var t = Date.now(); Date.now() - t <= time;);
  2459. }
  2460. var fuc = setInterval(function () {
  2461. //晚点再写
  2462. }, wait_time * 1000);
  2463. // xm_window.GM_info
  2464.  
  2465.  
  2466. if (window.location.href.indexOf("onlineenew.enetedu.com") != -1) {
  2467. function randomNum(minNum, maxNum) {
  2468. switch (arguments.length) {
  2469. case 1:
  2470. return parseInt(Math.random() * minNum + 1, 10);
  2471. break;
  2472. case 2:
  2473. return parseInt(Math.random() * (maxNum - minNum + 1) + minNum, 10);
  2474. break;
  2475. default:
  2476. return 0;
  2477. break;
  2478. }
  2479. }
  2480. window.onload = function () {
  2481. let pppplay = setInterval(function () {
  2482. if ($(".classcenter-chapter1 iframe").contents().find(".layui-layer-content iframe").length > 0) {
  2483. setTimeout(function () {
  2484. $(".classcenter-chapter1 iframe").contents().find(".layui-layer-content iframe").contents().find("#questionid~div button").trigger("click")
  2485. }, randomNum(15, 40) * 100);
  2486. } else {
  2487. $(".classcenter-chapter1 iframe").contents().find("video").trigger("play")
  2488. }
  2489. console.log(new Date().getTime(), $(".classcenter-chapter1 iframe").length, $(".classcenter-chapter1 iframe").contents().find(".layui-layer-content iframe").length)
  2490. }, 5000);
  2491. setTimeout(function () {
  2492. $(".classcenter-chapter1 iframe").contents().find("video").on("timeupdate", function () {
  2493. if (Math.ceil(this.currentTime) >= Math.ceil(this.duration)) {
  2494. //clearInterval(pppplay);
  2495. let flag = false;
  2496. $(".classcenter-chapter2 ul li").each(function (t) {
  2497. console.log($(this).css("background-color") == "rgb(204, 197, 197)")
  2498. if ($(this).css("background-color") != "rgb(204, 197, 197)") {
  2499. if ($(this).find("span").text() != "[100%]") {
  2500. flag = true;
  2501. $(this).trigger("click");
  2502. return false;
  2503. }
  2504. }
  2505. });
  2506. if (!flag) {
  2507. clearInterval(pppplay);
  2508. }
  2509. }
  2510. })
  2511. }, 8000);
  2512. }
  2513. }
  2514.  
  2515.  
  2516.  
  2517. if (window.location.href.indexOf("qingshunxuetang.com") != -1) {
  2518.  
  2519. let domain = 'https://degree.qingshuxuetang.com/'
  2520. let url = location.href;
  2521. if (url.indexOf('Course/CourseList') > -1) {
  2522. setTimeout(function () {
  2523. console.log('currentCourse', currentCourse)
  2524. sessionStorage.setItem('courses', JSON.stringify(currentCourse))
  2525. let course = currentCourse[0];
  2526. window.location.href = `${domain}cgjy/Student/Course/CourseStudy?courseId=${course.courseId}&teachPlanId=${course.teachPlanId}&periodId=${course.periodId}`
  2527. }, 3000)
  2528. } else if (url.indexOf('Course/CourseStudy') > -1) {
  2529. setTimeout(function () {
  2530. console.log('coursewareMedias', coursewareMedias)
  2531. var videos = [];
  2532. getVideoNode(coursewareMedias, videos)
  2533. console.log('videos', videos);
  2534. let video = videos[0];
  2535. let courseId = getQueryString('courseId');
  2536. let teachPlanId = getQueryString('teachPlanId');
  2537. let periodId = getQueryString('periodId');
  2538. let videoMaps = {}
  2539. videoMaps[courseId] = videos;
  2540. sessionStorage.setItem('videos', JSON.stringify(videoMaps))
  2541. window.location.href = `https://degree.qingshuxuetang.com/cgjy/Student/Course/CourseShow?teachPlanId=${teachPlanId}&periodId=${periodId}&courseId=${courseId}&nodeId=${video.id}`
  2542. }, 3000)
  2543. } else if (url.indexOf('Course/CourseShow') > -1) {
  2544. let courseId = getQueryString('courseId');
  2545. let nodeId = getQueryString('nodeId');
  2546. let videoMaps = JSON.parse(sessionStorage.getItem('videos'))
  2547. let teachPlanId = getQueryString('teachPlanId');
  2548. let periodId = getQueryString('periodId');
  2549. let nextVideo = getNextVideo(nodeId, videoMaps[courseId])
  2550. setTimeout(function () {
  2551. var video = document.getElementsByTagName("video")[0]
  2552. //设置静音
  2553. video.muted = true
  2554. //视频倍速
  2555. video.playbackRate = 2
  2556. //视频开始
  2557. video.play()
  2558. const nextUrl = `https://degree.qingshuxuetang.com/cgjy/Student/Course/CourseShow?teachPlanId=${teachPlanId}&periodId=${periodId}&courseId=${courseId}&nodeId=${nextVideo}`
  2559. // 下一条视频
  2560. video.addEventListener("ended", function () {
  2561. if (nextVideo == null) {
  2562. let courses = JSON.parse(sessionStorage.getItem('courses'))
  2563. let course = getNextCourse(courseId, courses)
  2564. if (course == null) {
  2565. window.location.href = 'https://baidu.com'
  2566. }
  2567. window.location.href = `${domain}cgjy/Student/Course/CourseStudy?courseId=${course.courseId}&teachPlanId=${course.teachPlanId}&periodId=${course.periodId}`
  2568. } else {
  2569. location.replace(nextUrl);
  2570. }
  2571. })
  2572. }, 5000)
  2573. getVideoTime()
  2574.  
  2575. }
  2576.  
  2577. function getNextVideo(current, videos) {
  2578. let next = null;
  2579. Array.prototype.forEach.call(videos, function (value, index) {
  2580. if (value.id === current && videos.length - 1 > index + 1) {
  2581. next = videos[index + 1].id
  2582. return false
  2583. }
  2584. })
  2585. return next;
  2586. }
  2587.  
  2588. function getNextCourse(current, courses) {
  2589. let next = null;
  2590. Array.prototype.forEach.call(courses, function (value, index) {
  2591. if (value.courseId == current && courses.length - 1 > index + 1) {
  2592. next = courses[index + 1]
  2593. return false
  2594. }
  2595. })
  2596. return next;
  2597. }
  2598.  
  2599. function getVideoNode(medias, videos) {
  2600. Array.prototype.forEach.call(medias, function (value, index) {
  2601. if (value.type === 'video') {
  2602. videos.push(value)
  2603. }
  2604. if (value.nodes != null) {
  2605. getVideoNode(value.nodes, videos)
  2606. }
  2607. })
  2608. }
  2609.  
  2610. function getQueryString(name) {
  2611. var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
  2612. var r = window.location.search.substr(1).match(reg);
  2613. if (r != null) {
  2614. return unescape(r[2]);
  2615. }
  2616. return null;
  2617. }
  2618.  
  2619. let currentVideoTime = null;
  2620.  
  2621. function getVideoTime() {
  2622. setInterval(function () {
  2623. var vid = document.getElementsByTagName("video")[0]
  2624. var currentTime = vid.currentTime.toFixed(1);
  2625. if (currentTime == currentVideoTime) {
  2626. console.log('视频卡住了,刷新~');
  2627. location.reload()
  2628. }
  2629. currentVideoTime = currentTime;
  2630. console.log('视频时间:', currentTime);
  2631. }, 5000);
  2632. }
  2633. }
  2634.  
  2635.  
  2636.  
  2637. if (window.location.href.indexOf("172.20.32.191/redir.php?catalog_id=6&cmd=dati") != -1) {
  2638.  
  2639. var host = window.location.host;
  2640. if (host != "10.66.100.207" && host != "172.26.0.150") {
  2641. var questions = document.getElementsByClassName("shiti");
  2642. var _question, question, index, answer;
  2643. var notfounds = new Array(), dislocations = new Array();
  2644. var notfound = 0, dislocation = 0;
  2645. for (let i = 0, __qlength__ = questions.length; i < __qlength__; ++i) {
  2646. _question = questions[i].children[0].textContent.split("\u3001");
  2647. index = _question.shift();
  2648. question = _question.join("\u3001").replace(/[^0-9A-Za-z\u4e00-\u9fff]/g, "").replace(/^(\u5224\u65ad|\u5355\u9009|\u591a\u9009)\u9898/, "");
  2649. answer = findAnswer(question);
  2650. var _text, _c, c, answers;
  2651. var answered = false;
  2652. if (answer != "") {
  2653. answers = answer.split("\u000a");
  2654. for (let choice = 0, __clength__ = questions[i].children[1].childElementCount; choice < __clength__; ++choice) {
  2655. var ipt = document.getElementById("ti_" + index + "_" + String(choice));
  2656. _text = ipt.parentNode.children[1].textContent.replace(/[\s\?]/g, "");
  2657. if (_text.length == 0) {
  2658. dislocations[dislocation++] = String(index);
  2659. questions[i].children[0].setAttribute("style", "color: red");
  2660. } else {
  2661. _c = _text.replace(/\./, "\u3001").replace(/\uff0e/, "\u3001").split("\u3001");
  2662. if (_c.length > 1) {
  2663. _c.shift();
  2664. }
  2665. c = _c.join("\u3001");
  2666. c = c.replace("\u6b63\u786e", "\u5bf9").replace("\u9519\u8bef", "\u9519");
  2667. for (let ai = 0, __alength__ = answers.length; ai < __alength__; ++ai) {
  2668. if (answers[ai] == c) {
  2669. ipt.click();
  2670. answered = true;
  2671. break;
  2672. }
  2673. }
  2674. }
  2675. }
  2676. if (!answered) {
  2677. notfounds[notfound++] = String(index);
  2678. questions[i].children[0].setAttribute("style", "color: red");
  2679. }
  2680. } else {
  2681. notfounds[notfound++] = String(index);
  2682. questions[i].children[0].setAttribute("style", "color: red");
  2683. }
  2684. }
  2685. if (notfound > 0 || dislocation > 0) {
  2686. if (notfound > 0) {
  2687. alert("\u6b64\u9875\u9762\u5171\u6709" + String(notfound) + "\u9053\u9898\u672a\u80fd\u81ea\u52a8\u586b\u5145\uff1a" + notfounds.join("\u3001"));
  2688. }
  2689. if (dislocation > 0) {
  2690. 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"));
  2691. }
  2692. } else {
  2693. var next = document.getElementsByClassName("nav")[0].children[0];
  2694. if (next && next.value == "\u4e0b\u4e00\u9875") {
  2695. next.click();
  2696. } else {
  2697. document.getElementsByClassName("nav")[0].children[1].click();
  2698. }
  2699. }
  2700. } else {
  2701. let Qs = new Array();
  2702. let __QsLen__ = 0;
  2703. if (document.getElementById("DataGridA")) {
  2704. for (let i = 0, __Q__ = document.getElementById("DataGridA").children[0], __QLen__ = __Q__.childElementCount; i < __QLen__; ++i) {
  2705. Qs[__QsLen__++] = __Q__.children[i];
  2706. }
  2707. }
  2708. if (document.getElementById("DataGridB")) {
  2709. for (let i = 0, __Q__ = document.getElementById("DataGridB").children[0], __QLen__ = __Q__.childElementCount; i < __QLen__; ++i) {
  2710. Qs[__QsLen__++] = __Q__.children[i];
  2711. }
  2712. }
  2713. if (document.getElementById("DataGridC")) {
  2714. for (let i = 0, __Q__ = document.getElementById("DataGridC").children[0], __QLen__ = __Q__.childElementCount; i < __QLen__; ++i) {
  2715. Qs[__QsLen__++] = __Q__.children[i];
  2716. }
  2717. }
  2718. let notfounds = new Array();
  2719. let notfound = 0;
  2720. for (let i = 0; i < __QsLen__; ++i) {
  2721. let t = Qs[i].children[0].children[0].children[0];
  2722. let _Q = t.children[0].children[0].children[0].textContent.split("\u3001");
  2723. let index = _Q.shift();
  2724. let Q = _Q.join("\u3001").replace(/[^0-9A-Za-z\u4e00-\u9fff]/g, "");
  2725. let A = findAnswer(Q);
  2726. let As = A.split("\u000a");
  2727. let Cs = t.children[1].children[0].children[0].children[0].children[0];
  2728. let answered = false;
  2729. for (let j = 0, __CsLen__ = Cs.childElementCount; j < __CsLen__; ++j) {
  2730. let _C = Cs.children[j].children[1].textContent.replace(/\./, "\u3001").replace(/\uff0e/, "\u3001").split("\u3001");
  2731. if (_C.length > 1) {
  2732. _C.shift();
  2733. }
  2734. let C = _C.join("\u3001");
  2735. C = C.replace("\u6b63\u786e", "\u5bf9").replace("\u9519\u8bef", "\u9519");
  2736. for (let k = 0, __AsLen__ = As.length; k < __AsLen__; ++k) {
  2737. if (C == As[k]) {
  2738. Cs.children[j].children[0].click();
  2739. answered = true;
  2740. break;
  2741. }
  2742. }
  2743. }
  2744. if (!answered) {
  2745. notfounds[notfound++] = String(index);
  2746. t.children[0].children[0].children[0].setAttribute("style", "color: red");
  2747. }
  2748. }
  2749. if (notfound > 0) {
  2750. alert("\u6b64\u9875\u9762\u5171\u6709" + String(notfound) + "\u9053\u9898\u672a\u80fd\u81ea\u52a8\u586b\u5145\uff1a" + notfounds.join("\u3001"));
  2751. }
  2752. }
  2753. }
  2754.  
  2755. if (window.location.href.indexOf("jwxt.scnuc.edu.cn") != -1) {
  2756. const skipWaiting = function (clickFun) {
  2757. $("#badge_text").remove();
  2758. const btn = $("#btn_yd");
  2759. btn.removeAttr("disabled");
  2760. btn.addClass("btn-primary");
  2761. btn.click(clickFun);
  2762. }
  2763.  
  2764. var localAddress = location.href;
  2765.  
  2766. // 登录界面跳过5秒
  2767. if (localAddress.indexOf("initMenu") > -1) {
  2768. if (document.getElementById('btn_yd')) {
  2769. skipWaiting(() => {
  2770. window.location.href = _path + '/xtgl/login_loginIndex.html';
  2771. });
  2772. }
  2773. }
  2774.  
  2775. // 预约教室页面跳过5秒等待
  2776. else if (localAddress.indexOf("cdjy") > -1 && document.getElementById('btn_yd')) {
  2777. skipWaiting(() => {
  2778. let gnmkdmKey = $('input#gnmkdmKey').val();
  2779. //全局文档添加参数
  2780. $(document).data("offDetails", "1");
  2781. //加载功能主页:且添加不再进入提示信息页面的标记字段
  2782. onClickMenu.call(this, '/cdjy/cdjy_cxCdjyIndex.html?doType=details', gnmkdmKey, { "offDetails": "1" });
  2783. });
  2784. }
  2785.  
  2786. // 成绩查询界面加入自动计算绩点
  2787. else if (localAddress.indexOf("cjcx") > -1) {
  2788. // 添加绩点span
  2789. var newTextNode = document.createElement("span");
  2790. newTextNode.innerText = "平均绩点:加载中";
  2791. newTextNode.id = "avgGPA";
  2792. $("#yhgnPage").append(newTextNode);
  2793.  
  2794. // 监听函数
  2795. const observeChange = function () {
  2796. let observer = new MutationObserver(function () {
  2797. // console.log("发生了改变");
  2798. if (document.getElementById("load_tabGrid").style.display === "none") {
  2799. setGPA();
  2800. observer.disconnect();
  2801. }
  2802. });
  2803. observer.observe(document.getElementById("load_tabGrid"), { attributes: true, attributeFilter: ['style'] });
  2804. }
  2805.  
  2806. // 首次进入
  2807. observeChange();
  2808. // 监听查询按钮
  2809. document.getElementById("search_go").onclick = function () {
  2810. // console.log("点击");
  2811. newTextNode.innerText = '平均绩点:加载中';
  2812. observeChange();
  2813. }
  2814. }
  2815.  
  2816. function setGPA() {
  2817. var page = Number(document.getElementById('sp_1_pager').innerText);
  2818. if (page <= 0) {
  2819. $("span#avgGPA").text('平均绩点:暂无成绩');
  2820. return;
  2821. } else if (page === 1) {
  2822. var sumCredit = 0, GPA = 0;
  2823. var credits_grades = $("td[aria-describedby='tabGrid_xfjd']");
  2824. var credits = $("td[aria-describedby='tabGrid_xf']");
  2825. for (let i = 0; i < credits.length; i++) {
  2826. sumCredit += Number(credits[i].innerText);
  2827. GPA += Number(credits_grades[i].innerText);
  2828. }
  2829. GPA /= sumCredit;
  2830. $("span#avgGPA").text('平均绩点:' + GPA.toFixed(2));
  2831. return;
  2832. }
  2833. var gnmkdm = $('input#gnmkdmKey').val();
  2834. var user = $('input#sessionUserKey').val();
  2835. var nd = Date.now();
  2836. var xqm = document.getElementById("xqm");
  2837. var xqm_val = xqm[xqm.selectedIndex].value;
  2838. var xnm = document.getElementById("xnm");
  2839. var xnm_val = xnm[xnm.selectedIndex].value;
  2840. // 发送请求
  2841. fetch('https://jwxt.scnuc.edu.cn' + ($("#jsxx").val() == "xs" ? '/cjcx/cjcx_cxXsgrcj.html' : '/cjcx/cjcx_cxDgXscj.html') + '?doType=query&gnmkdm=' + gnmkdm + '&su=' + user, {
  2842. "headers": {
  2843. "content-type": "application/x-www-form-urlencoded;charset=UTF-8"
  2844. },
  2845. "body": "xnm=" + xnm_val + "&xqm=" + xqm_val + "&_search=false&nd=" + nd + "&queryModel.showCount=100&queryModel.currentPage=1&queryModel.sortName=&queryModel.sortOrder=asc",
  2846. "method": "POST"
  2847. }).then(response => response.json()).then(data => {
  2848. let sumCredit = 0, GPA = 0;
  2849. // console.log(data)
  2850. for (let item of data.items) {
  2851. sumCredit += Number(item.xf);
  2852. GPA += Number(item.xfjd);
  2853. }
  2854. GPA /= sumCredit;
  2855. $("span#avgGPA").text('平均绩点:' + GPA.toFixed(2));
  2856. });
  2857. }
  2858.  
  2859. }
  2860.  
  2861.  
  2862.  
  2863. }
  2864.  
  2865. ready_main()