// ==UserScript== // @name 高等继续教育网高等学历继续教育网络学习平台自动刷课刷题 // @namespace http://greasyfork.org/ // @version 1.5 // @description 高等继续教育网高等学历继续教育网络学习平台自动刷课刷题,只适用于该网址:.jxjypt.cn // @author Roc.w // @match http*://*.jxjypt.cn/* // @icon https://www.jxjypt.cn/indexpage/images/icon.ico // @license AGPL License // @downloadURL none // ==/UserScript== console.log('您已进入高等继续教育网') console.log('欢迎使用树懒脚本! 联系作者:771185858@qq.com,微信:15113800044') console.log('采用纯原生JS写法 高性能、高可用、高兼容!') init() //初始化元素 function init() { //创建按钮元素 craeateButtonElement() //创建消息提示元素 craeateMsgElement() } //创建按钮元素 function craeateButtonElement() { let btnParam = { ele: document.createElement('div'), css: "display: flex;" + "cursor: pointer;" + "position: fixed;" + "right:40px;" + "top: 100px;" + "background: #aaa;" + "width: 50px;" + "height: 50px;" + "z-index:1000;" + "border-radius: 100%;", iconcss: "margin: auto;" + "width: 35px;" + "height: 35px;" + "line-height: 35px;" + "background: #fff;" + "animation:kite 5s infinite;" + "text-align: center;" + "font-size: 22px;" + "border-radius: 100%;" }; document.querySelector('body').appendChild(((ele) => { ele.id = 'sloth-topic'; // 添加允许拖拽属性 ele.setAttribute('draggable',true) ele.innerHTML = '
🎶🦥
'; ele.style.cssText = btnParam.css; return ele; })(btnParam.ele)); //动态创建keyframes动画 //document.styleSheets[0].insertRule(`@keyframes kite{100%{transform:rotate(360deg);}}`,0) const style = document.createElement('style') style.appendChild(document.createTextNode(`@keyframes kite{100%{transform:rotate(360deg);}}`)); document.getElementById('sloth-topic').appendChild(style); // 拖拽事件 document.getElementById('sloth-topic').addEventListener('dragend', function(e) { e.stopPropagation() const btn = document.getElementById('sloth-topic'); if (e.target.style['right'] > 0) e.target.style['right'] = 0 btn.style.cssText += btnParam.css + `left:${e.clientX}px;top:${e.clientY}px;`; }); //按钮点击操作 document.getElementById("sloth-topic").addEventListener("click", function () { start(); }); } //创建消息元素 function craeateMsgElement() { let msgParam = { ele: document.createElement('div'), css: "background: rgba(0,0,0,0.5);" + "position: fixed;" + "inset: 0px;" + "margin: auto;" + "padding: 10px;" + "border-radius: 5px;" + "color: #fff;" + "font-size: 14px;" + "letter-spacing: 1.5px;" + "display: none;" + "z-index: 99999;" }; document.querySelector('body').appendChild(((ele) => { ele.id = 'sloth-msg'; ele.innerHTML = ''; ele.style.cssText = msgParam.css; return ele; })(msgParam.ele)); } //消息提示 function msg(msg, timeout = 2500) { document.getElementById('sloth-msg').style.display = 'inline-table'; document.getElementById('sloth-msg').innerHTML = msg; setTimeout(() => { document.getElementById('sloth-msg').style.display = 'none'; }, timeout); } //点击开始按钮 function start() { msg('温馨提示:该脚本只包含了自动展开功能-------------课程学习、课程作业 代刷微信:wss88886 ¥10元一门课程',5000) //自动展开答案 var zkjxs = document.getElementsByClassName('zkjx') for (let i = 0; i < zkjxs.length; i++) { zkjxs[i].click() } }