Greasy Fork is available in English.

深信息雨课堂辅助

深信息雨课堂自动刷视频

  1. // ==UserScript==
  2. // @name 深信息雨课堂辅助
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0
  5. // @description 深信息雨课堂自动刷视频
  6. // @author monstertsl
  7. // @match https://sziit.yuketang.cn/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. //全局设置,0为关闭1为开启
  12. var settings = {
  13. requestInterval: 500, // 延迟
  14. clickLoopInterval: 300, //点击间隔
  15. questions_match : 0, // 匹配功能 默认关闭
  16. X2speed : 1 , //二倍速 默认开启
  17. setmuted: 1, //切换静音 默认开启
  18. qualityChange : 1 , //切换标清,默认开启
  19. Backgroungplay: 1, //后台播放 默认开启
  20. };
  21.  
  22.  
  23. //视频功能
  24. var firstset = 1;
  25. setInterval(function video() {
  26. var video = document.getElementsByClassName("xt_video_player")[0];
  27. if(video == undefined){
  28. document.getElementsByClassName("el-tooltip btn-next item")[0].click();
  29. console.log("作业,5秒后跳转下一个视频");
  30.  
  31. }
  32.  
  33.  
  34. else if(video.length != 0){
  35. var staNow = document.getElementsByClassName("play-btn-tip")[0];
  36. if(staNow.innerText == "播放"){
  37. console.log("播放视频");
  38. staNow .click();
  39.  
  40. }
  41. var player = $(".xt_video_player_common_list");
  42. var current_video = document.getElementsByTagName('video')[0]
  43. var urld = window.location.href;
  44. if(urld.match("video")&&firstset) {
  45. let speedChild = player.children()[0]; //二倍速
  46. if(settings.X2speed) speedChild.click();
  47. let quality = player.children()[5]; //标清
  48. if(settings.qualityChange) quality.click();
  49. if(settings.setmuted) current_video.muted=true; //静音
  50. firstset=0;
  51. }
  52. if(urld.match("video")) {
  53. if(settings.Backgroungplay){
  54. current_video.play();
  55. console.log("后台播放中");
  56. }
  57. }
  58. var c= video.currentTime;
  59. var d = video.duration;
  60. var pr =(c/d*100);
  61. pr = pr.toFixed(2);
  62. document.title =( pr+"%");
  63. //视频播放进度超过95%跳转下一节视频
  64. if(pr>95){
  65. document.getElementsByClassName("el-tooltip btn-next item")[0].click();
  66. console.log("跳转到下一节");
  67. location.reload();
  68. }
  69. }else {
  70. console.log("未知错误!");
  71. }
  72. },2000)
  73.  
  74.