小白菜学脚本 发表于 2022-2-24 15:25:03

求大神更改一下,帮助自动跳转播放页面

灯塔在线学习更改学习地址,以前代码失去作用,不知道怎么更改,学了一点明白了代码什么意思,但是不会用,跪求大声给指导一下
网站地址:https://dywlxy.dtdjzx.gov.cn/personal-center
从“我的课程”页面打开视频观看。

// ==UserScript==
// @name         灯塔党建党员教育挂机学习
// @namespace    **************
// @version      0.999
// @description灯塔党建在线挂机学习脚本
// @author       luter
// @match         *://*.dtdjzx.gov.cn/course/special/*
// @match         *://*.dtdjzx.gov.cn/*
// @match         *://*.dtdjzx.gov.cn/#/personSpace/*
// @match         *://gbwlxy.dtdjzx.gov.cn/content#/personalCenter
// @grant      none   
// ==/UserScript==
(function ()
        {setTimeout(function()
                {if(window.location.href.indexOf("#/home")!=-1){
      window.open();
      }
         else
         {
               if(window.location.href.indexOf("studyCours")!=-1)//课程列表页判断
                      {document.getElementsByClassName("el-table__row").getElementsByClassName("cell").getElementsByTagName("span").click();
               window.opener = null;
               window.open(' ','_self');
               window.close();}//关闭浏览器窗口
                else
                {document.getElementsByTagName("video").muted = true;
               document.getElementsByTagName("video").play();
               setInterval(function ()
                                    { var ti = document.getElementsByTagName("video").duration-document.getElementsByTagName("video").currentTime
                  console.log(ti)
                  if(ti ==0)
                  {setTimeout(function(){document.querySelector("#app > div > div.nav > div > ul > li:nth-child(10) > a").click();},10000);
                        //window.close();
                     setTimeout(function(){window.location.reload();},20000);
                  }
                  }, 10000);
                            }
            }
      }, 10000);
    }
    )();

cocang 发表于 2022-2-24 15:38:01

麻烦,还得注册
建议自学修改,我估计没人接麻烦的

小白菜学脚本 发表于 2022-2-24 16:07:35

cocang 发表于 2022-2-24 15:38
麻烦,还得注册
建议自学修改,我估计没人接麻烦的

哦,忘记了需要账号密码

李恒道 发表于 2022-2-24 19:00:26

代码不复杂的
哥哥坚持学半个月没问题的

unity韩 发表于 2022-2-28 19:33:29

不会的来,群里求助
页: [1]
查看完整版本: 求大神更改一下,帮助自动跳转播放页面