zaixian100f.com 在线100分 自动答题,自动学完视频

zaixian100f.com 在线100分 自动答题,自动学完视频, 如果需要题库,因题库是加密原因请 email联系 hllo@miw.cn

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

  1. // ==UserScript==
  2. // @name zaixian100f.com 在线100分 自动答题,自动学完视频
  3. // @namespace www.miw.cn
  4. // @description zaixian100f.com 在线100分 自动答题,自动学完视频, 如果需要题库,因题库是加密原因请 email联系 hllo@miw.cn
  5. // @match *://*.zaixian100f.com/*
  6. // @grant none
  7. // @version 1.2.1
  8. // @author hello@miw.cn
  9. // @license MIT
  10. // @run-at document-start
  11. // ==/UserScript==
  12. const ans ={};
  13.  
  14. const answer = (x,v)=>{
  15. o=x.parentNode.nextElementSibling.querySelectorAll(`[value=${v}]`);
  16. if(o.length) {
  17. o[0].click();
  18. }
  19. }
  20.  
  21. const doit=()=>{
  22. document.querySelectorAll('[id^=questions_]').forEach(x=>{
  23. id = x.id.substr(10);
  24. an = ans[id];
  25. if(an){
  26. if(an!='true' && an!='false'){
  27. for(v of an.split('')){
  28. answer(x,v);
  29. }
  30. } else {
  31. answer(x,an);
  32. }
  33.  
  34. }
  35. });
  36. };
  37.  
  38. const videoFinal=()=>{
  39. const params = location.href.split('?')[1].split('&');
  40. console.log(params);
  41. var p = {"now_minute":"63:00","need_face_num":0,"vide_ratio":"0.01"};
  42. for(let s of params){
  43. let a=s.split('=');
  44. p[a[0]]=a[1];
  45. }
  46. fetch("https://www.zaixian100f.com/api/course/addStudyTime", {
  47. "headers": {
  48. "content-type": "application/json",
  49. },
  50. "referrerPolicy": "strict-origin-when-cross-origin",
  51. "body": "{\"course_id\":"+p.courseId+",\"lesson_id\":"+p.lessonId+",\"now_minute\":\"59:50\",\"need_face_num\":0,\"vide_ratio\":\"0\"}",
  52. "method": "POST",
  53. "mode": "cors",
  54. "credentials": "include"
  55. }).then(res=>res.json()).then(json=>{
  56. console.log(json);
  57. //location.reload();
  58. setTimeout(()=>{
  59. document.querySelector('.to-course').click();
  60. },2000);
  61. });
  62. }
  63.  
  64. const addFunc=(c,n,fn)=>{
  65. p=document.querySelector(`${c}`);
  66.  
  67. if(!!p){
  68. const have = p.querySelectorAll('.__doit');
  69. if(have.length==0){
  70. btn = document.createElement("button");
  71. btn.textContent = n;
  72. btn.classList.add('__doit');
  73. btn.addEventListener('click', function() {
  74. fn && fn();
  75. });
  76. p.appendChild(btn);
  77. }
  78.  
  79. }
  80.  
  81. }
  82.  
  83. const addFuncs=()=>{
  84. addFunc('.lesson—left h1','学完收工',()=>{
  85. videoFinal();
  86. });
  87. addFunc('.test-paper h4','自动答题',()=>{
  88. doit();
  89. });
  90. }
  91.  
  92. (function () {
  93. var ___open = window.XMLHttpRequest.prototype.open;
  94. window.XMLHttpRequest.prototype.open = async function (method, url, async) {
  95. //console.log("xhr时url",url);
  96. const res = await ___open.apply(this, arguments);
  97. if(url.indexOf('/api/exam/testPaper')!=-1){
  98. //console.log("返回结果",typeof res);
  99. }
  100. addFuncs();
  101. return res;
  102. };
  103. })();
  104.  
  105. (function() {
  106. const nativeSend = XMLHttpRequest.prototype.send;
  107.  
  108. XMLHttpRequest.prototype.send = function(body) {
  109. const nativeOnReadyStateChange = this.onreadystatechange;
  110. this.onreadystatechange = function() {
  111. if (this.readyState === 4) {
  112. const responseText = this.responseText;
  113. //console.log('Original response:', responseText);
  114. // this.responseText = 'Modified response';
  115. const res = JSON.parse(responseText);
  116. const list = res.data.testpaper_item || res.data.content || res.data.items;
  117. if(list && list.length){
  118. list.map(x=>{
  119. an = JSON.parse(x.answer).answer;
  120. //console.log(an);
  121. ans[x.id] = typeof an ==='string' ? an : an.join('');
  122. });
  123. }
  124. }
  125.  
  126. if (nativeOnReadyStateChange) {
  127. nativeOnReadyStateChange.apply(this, arguments);
  128. }
  129. };
  130. nativeSend.apply(this, arguments);
  131. };
  132. })();
  133.  
  134. setTimeout(()=>{
  135. addFuncs();
  136.  
  137. },2000);

QingJ © 2025

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