腾讯课堂自动签到

自动签到腾讯课堂,2020-03-04有效,不会误点提交答案

< Feedback em 腾讯课堂自动签到

Pergunta/comentário

§
Publicado: 24/03/2020

[Feature] 在聊天框提醒

> function addNotification(){
>     var noHTML = `
>   <div class="chat-item chat-item-msg">
>       <div class="member-item is-self-student is-teacher">
>           <div class="member-item-content">
>               <div class="member-item-nickname member-item-nickname-fullline" >
>                   <span class="member-item-inner member-item-inner-fullline">腾讯课堂自动签到</span>
>               </div>
>           </div>
>       </div>
>       <div class="chat-item-msg-content js-chat-item-msg-content">
>           <span>${new Date().Format("hh:mm:ss")} 自动签到成功!</span>
>       </div>
>   </div>`;
>     document.querySelector(".chat-list").insertAdjacentHTML("beforeend",noHTML);
> }
> Date.prototype.Format = function (fmt) { //author: meizz
>     var o = {
>         "M+": this.getMonth() + 1, //月份
>         "d+": this.getDate(), //日
>         "h+": this.getHours(), //小时
>         "m+": this.getMinutes(), //分
>         "s+": this.getSeconds(), //秒
>         "q+": Math.floor((this.getMonth() + 3) / 3), //季度
>         "S": this.getMilliseconds() //毫秒
>     };
>     if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
>     for (var k in o)
>     if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
>     return fmt;
> }

然后再clickconfirm中调用即可

> function clickConfirm() {
>         'use strict';
>         var elements2 = document.getElementsByClassName("s-btn s-btn--primary s-btn--m");
>         for(var i = 0; i < elements2.length; i++) {
>             try {
>                 var element = elements2[i];
>                 if(element.innerHTML == "确定") {
>                     element.click();
>                     addNotification();
>                     break;
>                 }
>             }
>             catch(e){}
>         }
>     }
§
Publicado: 29/04/2020

感谢!

Publicar resposta

Faça o login para publicar uma resposta.