Script Archived
This script has been archived by the author. The script may be no longer functional, and the author no longer maintains it. You cannot provide feedback for this script.
// ==UserScript==
// @name 蓝墨云班课作业互评自动评满分
// @namespace https://bbs.tampermonkey.net.cn/
// @version 1.1
// @description 云班课作业互评自动评满分
// @author Ne-21
// @compatible Chrome
// @match *://www.mosoteach.cn/web/index.php?c=interaction_homework&m=homework_result_list*
// @grant unsafeWindow
// @require http://libs.baidu.com/jquery/2.0.0/jquery.min.js
// @license MIT
// ==/UserScript==
(function() {
var _self = unsafeWindow;
var $ = _self.jQuery || top.jQuery;
$(document).ready( function () {
alert("请点击确定开始自动评分");
console.log("开始自动评分BY.Ne-21");
var list = document.querySelectorAll('.homework-item');
var total = list.length - 1;
var i = 1;
let t = setInterval( function () {
console.log("共计:" + total + "位,开始评分:第" + i + "位");
var one = list[i];
// i++;
doPingfen(one);
i++;
if ( i == total+1) {
// 清除Interval的定时器
clearInterval(t);
console.log("全部完成");
alert("评分操作全部完成!");
};
},3000);
});
})();
function doPingfen(one) {
// console.log(one);
try{
var s = one.querySelector("div.appraised-box.cl > div > span.user-current-score").textContent;
// console.log(s);
if ( s == "请评分" ) {
one.querySelector("div > span.appraise-button.appraised-button-enable").click()
console.log("选中评分");
let a = setInterval( function () {
one.querySelector('div.item-score-box > div.score-points-item.cl > ul > li:nth-child(1)').click();
console.log("选中分数");
one.querySelector('#score').click();
console.log("评分完成");
// 清除Interval的定时器
clearInterval(a);
},3000);
} else {
console.log("重复评分,跳过!")
};
return;
} catch(e) {
console.log("可能是没有提交。" + e);
return;
};
};