1485773425 发表于 2022-5-9 14:38:03

求一个智慧树不被检测的脚本

求一个智慧树不被检测的脚本,能考试的,10倍速播放的

Nayuta 发表于 2022-5-10 17:16:28

两个脚本配合使用
// ==UserScript==
// @name         15倍智慧树
// @namespace    http://github.com/kakasearch
// @version      1.4
// @description15倍播放视频,秒过文档,自动切换
// @author       kakasearch
// @match      https://studyh5.zhihuishu.com/videoStudy.html
// @match      https://lc.zhihuishu.com/live/vod_room.html*
// @match      https://hike.zhihuishu.com/*
// @match       https://hike.zhihuishu.com/aidedteaching/sourceLearning/sourceLearning*
// @grant      none
// @run-at       document-end
// ==/UserScript==

let style = `/*.dialog-test {
    display: none;
}*/
.v-modal {
    display: none;
}
.stopAutoButton {
    display: block;
    position: fixed;
    left: 2rem;
    bottom: 1rem;
    padding: 0.5rem;
    color: #fff;
    background-color: #000;
    font-size: 2rem;
    cursor: pointer;
    z-index: 99999;
}`;

(function ($) {
    $(function () {
      let isAuto = localStorage.getItem("isAuto") == "true" ? true : false;
      $("<style/>").html(style).appendTo($("body"));
      let addDiv = function () {
            if ($(".video-js").length ||$(".icon-doc").length ) {
                $("<div/>").text(isAuto ? "关闭自动播放" : "开启自动播放").addClass("stopAutoButton").on("click", function () {
                  isAuto = !isAuto;
                  localStorage.setItem("isAuto", "" + isAuto);
                  $(this).text(isAuto ? "关闭自动播放" : "开启自动播放");
                  if (isAuto) {
                        window.repeatInterval = setInterval(repeat, 100);
                  } else {
                        clearInterval(window.repeatInterval);
                  }
                }).insertBefore($("body"));
            } else {
                setTimeout(addDiv, 100);
            }
      };
      let next = 0;
      addDiv();
      let course_class = 0
      if(/hike/.test(window.location.href)){
            course_class = '翻转课'
      }
      let repeat = function () {
            if (!$(".stopAutoButton").length) {
                addDiv();
            }
            let rate
            if(course_class =='翻转课'){
                rate = document.querySelector(".speedTab05")

            }else{
                rate = $(".speedList>div")
            }
            if (rate) {
                rate.setAttribute("rate", "15.0");
                $(rate).click();
            }
            //document.querySelector("#vjs_mediaPlayer > div.controlsBar > div.definiBox > div > b.line1bq").click() 普通清晰度
            var current_play_video
            if(course_class =='翻转课'){
                current_play_video = document.querySelector(".file-item.active");//当前播放的视频单元

                let time_finish = current_play_video.querySelector(".status-box > i")
                if(time_finish && (new Date() - next) > 10000){//报错忽略...
                  console.log('下一条')
                  if(current_play_video.nextElementSibling != null){
                        current_play_video.nextElementSibling.click()
                  }else{
                        let a =Array.from(document.querySelectorAll(".file-item"))
                        for(let i of a){
                            if(i.querySelector('.icon-finish') == null){
                              i.click()
                              break
                            }
                        }
                        //刷完
                        //window.close()
                  }
                  next = new Date();
                }else{
                  if ($("video").prop("paused")) {
                        $("#playButton").click();}
                }

            }else{//共享课
                try{
                  var myPlayer = document.getElementById('vjs_container_html5_api')
                  // 视频暂停监听
                  myPlayer.onpause = function(){
                        setTimeout(function(){
                            var playVideo = document.getElementById('playButton');
                            playVideo.click();
                        }, 5000);
                        let tm = document.getElementsByClassName("el-scrollbar__view");
                        let tm_opt_a = tm.getElementsByClassName("topic-item");
                        tm_opt_a.click();//只选择第一个选项,对错不影响
                        setTimeout(function(){
                            let btn6 = document.getElementsByClassName('btn');
                            btn6.click();
                        }, 3000);

                  };
                }catch{}
                var videoLists = document.getElementsByClassName('el-scrollbar__view');//视频目录
                let current_play_video = videoLists.getElementsByClassName('current_play');//当前播放的视频单元
                let time_finish = current_play_video.getElementsByClassName('time_icofinish');
                if(time_finish.hasAttribute('hidden')){//报错忽略...
                }else{
                  if((new Date() - next) > 10000) {
                        /* 播放完毕后 10 秒内不重复点击,防止“禁止跳课”提示刷屏 */
                        document.querySelector("#nextBtn").click()
                        next = new Date();
                  } else if ($("video").prop("paused")) {
                        $("#playButton").click();
                  }
                }
            }

            if (!$(".stopAutoButton").length) {
                addDiv();
            }
      }
      if (isAuto) {
            window.repeatInterval = setInterval(repeat, 100);
      }
    });
})(jQuery);// ==UserScript==
// @name         智慧树2022/5/8更新破解
// @namespace    http://tampermonkey.net/
// @version      0.1
// @descriptiontry to take over the world!
// @author       You
// @match      *://*.zhihuishu.com/*
// @grant      unsafeWindow
// @run-at       document-start
// ==/UserScript==

(function() {
    'use strict';
    // 作业考试文本破解
    unsafeWindow.Element.prototype.attachShadow = undefined;
    // 异常脚本破解
    unsafeWindow.Element.prototype._addEventListener = Element.prototype.addEventListener;
    unsafeWindow.Element.prototype.addEventListener = function () {
      const args = [...arguments];
      const temp = args;
      args = function () {
            const args2 = [...arguments];
            args2 = new Proxy(args2, {
                get(target, p) {
                  return p === 'isTrusted' ? true : target;
                }
            });
            return temp(...args2);
      };
      return this._addEventListener(...args);
    };

    // Your code here...
})();

Nayuta 发表于 2022-5-10 17:17:29

Nayuta 发表于 2022-5-10 17:16
两个脚本配合使用

十五倍速

肥宅橘子 发表于 2022-5-13 22:26:49

Nayuta 发表于 2022-5-10 17:17
十五倍速

不会异常吗?15倍

jooa 发表于 2022-5-14 00:33:43

Nayuta 发表于 2022-5-10 17:16
两个脚本配合使用

大佬,这个导入了无效
页: [1]
查看完整版本: 求一个智慧树不被检测的脚本