智慧树

try to take over the world!

  1. // ==UserScript==
  2. // @name 智慧树
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description try to take over the world!
  6. // @author 不二
  7. // @match http://study.zhihuishu.com/learning/videoList?courseId=*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. var fa=$("body");
  12. var btn=$("<li></li>");
  13. var json={
  14. "background":"#31e16d",
  15. "height":"16px",
  16. "padding":"5px",
  17. "cursor": "pointer",
  18. "top":"300px",
  19. "right":"80px",
  20. "position": "fixed"
  21. };
  22. btn.css(json);
  23. btn.html("<span id='lfsenior'>开启自动播放模式</span>");
  24. fa.append(btn);
  25. var bodywidth=$("#body").css("width");
  26. var mainwidth=$("#main").css("width");
  27. btn.click(function () {
  28. $("#lfsenior").html("自动模式已开启");
  29. //关闭弹题
  30. setInterval(function(){
  31. $(".popboxes_close").click();
  32. //获取当前进度
  33. var spans=$(".current_play span");
  34. var progress=spans[spans.size()-1].innerHTML;
  35. document.getElementsByClassName('speedTab15')[0].click();
  36. if("100"==progress.substring(progress.lastIndexOf("『")+1,progress.lastIndexOf("』")-1)){
  37. //播放完毕
  38. $(".next_lesson a").click();
  39. document.getElementsByClassName('speedTab15')[0].click();
  40. }else{
  41. $("#vjs_mediaplayer_html5_api")[0].play();
  42. $("#vjs_mediaplayer_html5_api")[0].muted=true;
  43. document.getElementsByClassName('speedTab15')[0].click();
  44. }
  45. $("#lfsenior").html("自动模式已开启,本章进度:"+progress+"%");
  46. document.getElementsByClassName('speedTab15')[0].click();
  47. },100);
  48. });

QingJ © 2025

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