// ==UserScript== // @name New Userscript // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author You // @match https://www.mosoteach.cn/web/index.php?c=interaction&m=index&clazz_course_id=0B7521D8-AB44-11ED-8539-1C34DA7B3F7C // @icon https://www.google.com/s2/favicons?sz=64&domain=mosoteach.cn // @grant none // ==/UserScript== (function () { if (window.location.host !== 'www.mosoteach.cn') return async function sleep(time) { return new Promise((resolve) => { setTimeout(() => { resolve() }, time) }) } function createButton(text) { const button = document.createElement("button"); button.innerText = text button.style.position = 'fixed' button.style.height = '50px' button.style.backgroundColor = 'red' button.style.top = '20px' button.style.right = '20px' button.style.color = '#ffffff' button.style.fontSize = '30px' button.style.textAlign = 'center' button.style.lineHeight = '50px' return button } function createMask() { const mask = document.createElement("div"); mask.style.position = 'fixed' mask.style.width = '100%' mask.style.height = '100%' mask.style.backgroundColor = 'rgba(0,0,0,.3)' mask.style.top = '0' mask.innerText = '脚本运行中,请稍后......' mask.style.color = '#ffffff' mask.style.fontSize = '30px' mask.style.textAlign = 'center' mask.style.lineHeight = '800px' return mask } ; (() => { document.querySelectorAll('.appraise-button').forEach(btn => btn.click()) const button = createButton('点击一键互评') document.body.appendChild(button) button.onclick = async () => { const mask = createMask() document.body.appendChild(mask) await sleep(5000) document.body.removeChild(mask) document.querySelectorAll('.shortcut-score').forEach(p => p.firstChild.click()) document.querySelectorAll('.button-big').forEach(p => p.click()) } })() })();