慕课作业互评(使用脚本自动互评)

MoocHomeworkCheck100

慕课作业互评一键一百分

使用方法

  1. 使用Chrome或者firefox等浏览器打开作业批改页面
  2. 按F12(打开开发者模式),选择Console选项卡
  3. 粘贴代码,回车可以看到页面右侧出现如图悬浮框
  4. 在大输入框中输入评价内容,在小输入框中输入要批量评价的 份数
  5. 点击"Fuck It Now",即可自动完成(大概5秒),

js代码

如果js代码复制有问题时(可能会弹出窗口,但不能运行),去这里复制代码:

let suckIt = `<div style="position: fixed;top: 50%;z-index: 999;right: 10%;padding: 1em;background: rgba(233,233,233,.6);border: 1px solid #aaa;">
<textarea placeholder="评价内容" id="fuckMe" style="padding: 10px;height: 60px;width: 200px;margin: 10px;">Good Job Bro.</textarea>
<p style="text-align: center;">
<input type="text"  id="times" placeholder="份数,1 ~ 20" style="width: 100px;padding: .4em;margin: 0 1em;background: #fff;border: 1px solid #999;float: left;" value="1">
<input type="submit" value="Fuck It Now" οnclick="fuckIt();" style="border: 1px solid #aaa;padding: 5px;color: #999;cursor: pointer;">
</p>
</div>`;
document.body.insertAdjacentHTML("afterbegin", suckIt);

function fuckIt() {
          
   
    let judge = document.getElementById(fuckMe).value || Good Job;
    let times = document.getElementById(times).value || 1;
    if (times > 0 && times < 21) {
          
   
        let fuck = setInterval(() => {
          
   
            document.querySelectorAll(.s).forEach(e => {
          
   
                e.children[e.children.length - 1].children[0].checked = true
            });
            document.querySelectorAll(.j-textarea).forEach(e => {
          
   
                e.value = judge
            });
            document.querySelector(.j-submitbtn).click();
            times--;
            setTimeout(() => {
          
   
                if (times !== 0) {
          
   
                    console.log(`还剩${
            
     times}份`);
                    document.getElementsByClassName(j-gotonext)[0].click();
                } else {
          
   
                    console.log(`已完成`);
                    document.getElementsByClassName(j-backbtn)[0].click();
                    window.clearInterval(fuck);
                    return false;
                }
            }, 666);
        }, 2333);
    } else {
          
   
        alert("次数错误,范围1 ~ 20");
        return false;
    }
}

注意

经验分享 程序员 微信小程序 职场和发展