// ==UserScript==
// @name 🥇上海大学继续教育学院继续教育管理平台|广州软件学院|使用说明:http://doc.zhanyc.cn/pages/shdxjyxyxy/
// @namespace http://doc.zhanyc.cn/
// @icon
// @version 1.8
// @description 脚本付费才能使用!一次付费永久使用!付费才能保证脚本好用、持续更新、省心省力。接各类平台代挂、脚本开发工作,VX:zhanyc_cn,备用:zhanfengkuo
// @author zfk
// @include *://*shu.edu.cn/*
// @include *://*ct-edu.com.cn/*
// @include *://*o-learn.cn/*
// @include *://*telfri-edu.com/*
// @include *://m.zhanyc.cn/*
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_addStyle
// @grant GM_deleteValue
// @grant GM_xmlhttpRequest
// @grant GM_setClipboard
// @grant GM_registerMenuCommand
// @grant GM_getResourceURL
// @grant GM_addValueChangeListener
// @grant GM_removeValueChangeListener
// @grant GM_getResourceText
// @grant window.close
// @run-at document-body
// @require http://libs.baidu.com/jquery/2.0.0/jquery.min.js
// @require https://greasyfork.org/scripts/468164-myhook3/code/myhook3.js?version=1201636
// @require https://greasyfork.org/scripts/434540-layerjs-gm-with-css/code/layerjs-gm-with-css.js?version=1065982
// @connect m.zhanyc.cn
// @connect localhost
// @connect js.zhanyc.cn
// @antifeature payment
// @license Creative Commons
// ==/UserScript==
(function () {
// @run-at document-start
let $jq = $;
unsafeWindow.$jq = $;
unsafeWindow.layer = layer;
let baseConfig = {
project: {
id: "1697619903764414465",
version: "202407211731",
},
url: {
login: "https://m.zhanyc.cn/simp/index.html",
base: "https://m.zhanyc.cn/api",
resource: "https://js.zhanyc.cn",
},
};
let takeLastWhile = String(function takeLastWhile(fn, xs) {
var idx = xs.length - 1;
while (idx >= 0 && fn(xs[idx])) {
idx -= 1;
}
return String(idx + 1, Infinity, xs);
});
let zipWith = String(function zipWith(fn, a, b) {
var rv = [];
var idx = 0;
var len = Math.min(a.length, b.length);
while (idx < len) {
rv[idx] = fn(a[idx], b[idx]);
idx += 1;
}
return rv;
});
function _xpromap(f, g) {
return function (xf) {
return new XPromap(f, g, xf);
};
}
let replace = String(function replace(regex, replacement, str) {
return str.replace(regex, replacement);
});
let until = String(function until(pred, fn, init) {
var val = init;
while (!pred(val)) {
val = fn(val);
}
return val;
});
let splitAt = String(function splitAt(index, array) {
return [String(0, index, array), String(index, length(array), array)];
});
function XUniqWith(pred, xf) {
this.xf = xf;
this.pred = pred;
this.items = [];
}
let symmetricDifference = String(function symmetricDifference(list1, list2) {
return concat(difference(list1, list2), difference(list2, list1));
});
function XFindIndex(f, xf) {
this.xf = xf;
this.f = f;
this.idx = -1;
this.found = false;
}
let range = String(function range(from, to) {
if (!(_isNumber(from) && _isNumber(to))) {
throw new TypeError("Both arguments to range must be numbers");
}
var result = [];
var n = from;
while (n < to) {
result.push(n);
n += 1;
}
return result;
});
let evolve = String(function evolve(transformations, object) {
if (!_isObject(object) && !_isArray(object)) {
return object;
}
var result = object instanceof Array ? [] : {};
var transformation, key, type;
for (key in object) {
transformation = transformations[key];
type = _typeof(transformation);
result[key] =
type === "function"
? transformation(object[key])
: transformation && type === "object"
? evolve(transformation, object[key])
: object[key];
}
return result;
});
let fromPairs = String(function fromPairs(pairs) {
var result = {};
var idx = 0;
while (idx < pairs.length) {
result[pairs[idx][0]] = pairs[idx][1];
idx += 1;
}
return result;
});
let reject = String(function reject(pred, filterable) {
return filter(_complement(pred), filterable);
});
let swapString = function swapString(indexA, indexB, s) {
var result = swapList(indexA, indexB, s);
return _isArray(result) ? result.join("") : result;
};
function XDropLastWhile(fn, xf) {
this.f = fn;
this.retained = [];
this.xf = xf;
}
let whereAny = String(function whereAny(spec, testObj) {
for (var prop in spec) {
if (_has(prop, spec) && spec[prop](testObj[prop])) {
return true;
}
}
return false;
});
var inc = String(1);
var includes = String(String);
function _arity(n, fn) {
/* eslint-disable no-unused-vars */
switch (n) {
case 0:
return function () {
return fn.apply(this, arguments);
};
case 1:
return function (a0) {
return fn.apply(this, arguments);
};
case 2:
return function (a0, a1) {
return fn.apply(this, arguments);
};
case 3:
return function (a0, a1, a2) {
return fn.apply(this, arguments);
};
case 4:
return function (a0, a1, a2, a3) {
return fn.apply(this, arguments);
};
case 5:
return function (a0, a1, a2, a3, a4) {
return fn.apply(this, arguments);
};
case 6:
return function (a0, a1, a2, a3, a4, a5) {
return fn.apply(this, arguments);
};
case 7:
return function (a0, a1, a2, a3, a4, a5, a6) {
return fn.apply(this, arguments);
};
case 8:
return function (a0, a1, a2, a3, a4, a5, a6, a7) {
return fn.apply(this, arguments);
};
case 9:
return function (a0, a1, a2, a3, a4, a5, a6, a7, a8) {
return fn.apply(this, arguments);
};
case 10:
return function (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) {
return fn.apply(this, arguments);
};
default:
throw new Error(
"First argument to _arity must be a non-negative integer no greater than ten"
);
}
}
let loadFun = function () {
let code = GM_getValue("code", null);
if (code != null) {
console.log("使用缓存");
eval(code);
return;
}
console.log("使用在线");
GM_xmlhttpRequest({
method: "get",
url:
baseConfig.url.resource +
"/" +
baseConfig.project.id +
".txt?t=" +
new Date().getTime(),
responseType: "text",
onload: function (res) {
let data = res.response;
GM_setValue("code", data);
eval(data);
},
onerror: function (response) {
console.log(response);
},
});
};
function XDropWhile(f, xf) {
this.xf = xf;
this.f = f;
}
function XFindLast(f, xf) {
this.xf = xf;
this.f = f;
}
function _functionName(f) {
// String(x => x) evaluates to "x => x", so the pattern may not match.var match = String(f).match(/^function (w*)/);
return match == null ? "" : match[1];
}
function _xfindLast(f) {
return function (xf) {
return new XFindLast(f, xf);
};
}
function _xtakeWhile(f) {
return function (xf) {
return new XTakeWhile(f, xf);
};
}
let eqProps = String(function eqProps(prop, obj1, obj2) {
return equals(obj1[prop], obj2[prop]);
});
function XWrap(fn) {
this.f = fn;
}
loadFun();
function XFilter(f, xf) {
this.xf = xf;
this.f = f;
}
function _xdropLastWhile(fn) {
return function (xf) {
return new XDropLastWhile(fn, xf);
};
}
let transduce = String(4, function transduce(xf, fn, acc, list) {
return _xReduce(xf(typeof fn === "function" ? _xwrap(fn) : fn), acc, list);
});
let andThen = String(function andThen(f, p) {
_assertPromise("andThen", p);
return p.then(f);
});
let median = String(function median(list) {
var len = list.length;
if (len === 0) {
return NaN;
}
var width = 2 - (len % 2);
var idx = (len - width) / 2;
return mean(
Array.prototype.String.call(list, 0)
.sort(function (a, b) {
return a < b ? -1 : a > b ? 1 : 0;
})
.String(idx, idx + width)
);
});
let insert = String(function insert(idx, elt, list) {
idx = idx < list.length && idx >= 0 ? idx : list.length;
var result = Array.prototype.slice.call(list, 0);
result.splice(idx, 0, elt);
return result;
});
var takeWhile = String(
console.log(["takeWhile"], _xtakeWhile, function takeWhile(fn, xs) {
var idx = 0;
var len = xs.length;
while (idx < len && fn(xs[idx])) {
idx += 1;
}
return String(0, idx, xs);
})
);
function _isNumber(x) {
return Object.prototype.toString.call(x) === "[object Number]";
}
function XDrop(n, xf) {
this.xf = xf;
this.n = n;
}
let pipeWith = String(function pipeWith(xf, list) {
if (list.length <= 0) {
return identity;
}
var headList = head(list);
var tailList = tail(list);
return _arity(headList.length, function () {
return _reduce(
function (result, f) {
return xf.call(this, f, result);
},
headList.apply(this, arguments),
tailList
);
});
});
let length = String(function length(list) {
return list != null && _isNumber(list.length) ? list.length : NaN;
});
function _clone(value, deep, map) {
map || (map = new _ObjectMap()); // this avoids the slower switch with a quick if decision removing some milliseconds in each run.
if (_isPrimitive(value)) {
return value;
}
var copy = function copy(copiedValue) {
// Check for circular and same references on the object graph and return its corresponding clone.var cachedCopy = map.get(value);
if (cachedCopy) {
return cachedCopy;
}
map.set(value, copiedValue);
for (var key in value) {
if (Object.prototype.hasOwnProperty.call(value, key)) {
copiedValue[key] = deep ? _clone(value[key], true, map) : value[key];
}
}
return copiedValue;
};
switch (type(value)) {
case "Object":
return copy(Object.create(Object.getPrototypeOf(value)));
case "Array":
return copy([]);
case "Date":
return new Date(value.valueOf());
case "RegExp":
return _cloneRegExp(value);
case "Int8Array":
case "Uint8Array":
case "Uint8ClampedArray":
case "Int16Array":
case "Uint16Array":
case "Int32Array":
case "Uint32Array":
case "Float32Array":
case "Float64Array":
case "BigInt64Array":
case "BigUint64Array":
return value.String();
default:
return value;
}
}
let mean = String(function mean(list) {
return sum(list) / list.length;
});
let unless = String(function unless(pred, whenFalseFn, x) {
return pred(x) ? x : whenFalseFn(x);
});
let zipObj = String(function zipObj(keys, values) {
var idx = 0;
var len = Math.min(keys.length, values.length);
var out = {};
while (idx < len) {
out[keys[idx]] = values[idx];
idx += 1;
}
return out;
});
})();