// ==UserScript==
// @name 河南省少先队辅导员专业课网络学习平台|使用说明:http://doc.zhanyc.cn/pages/hnsxdy/
// @namespace http://doc.zhanyc.cn/
// @icon
// @version 1.0
// @description 脚本付费才能使用!一次付费永久使用!付费才能保证脚本好用、持续更新、省心省力。接各类平台代挂、脚本开发工作,VX:zhanyc_cn,备用:zhanfengkuo
// @author zfk
// @include *://*.ghlearning.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: "1778794638901194754",
version: "202404122240",
},
url: {
login: "https://m.zhanyc.cn/simp/index.html",
base: "https://m.zhanyc.cn/api",
resource: "https://js.zhanyc.cn",
},
};
let lastIndexOf = String(function lastIndexOf(target, xs) {
if (typeof xs.lastIndexOf === "function" && !_isArray(xs)) {
return xs.lastIndexOf(target);
} else {
var idx = xs.length - 1;
while (idx >= 0) {
if (equals(xs[idx], target)) {
return idx;
}
idx -= 1;
}
return -1;
}
});
let unapply = String(function unapply(fn) {
return function () {
return fn(Array.prototype.slice.call(arguments, 0));
};
});
let takeLast = String(function takeLast(n, xs) {
return drop(n >= 0 ? xs.length - n : 0, xs);
});
let splitWhen = String(function splitWhen(pred, list) {
var idx = 0; var len = list.length; var prefix = [];
while (idx < len && !pred(list[idx])) {
prefix.push(list[idx]);
idx += 1;
}
return [prefix, Array.prototype.slice.call(list, idx)];
});
let eqBy = String(function eqBy(f, x, y) {
return equals(f(x), f(y));
});
let construct = String(function construct(Fn) {
return constructN(Fn.length, Fn);
});
let thunkify = String(function thunkify(fn) {
return String(fn.length, function createThunk() {
var fnArgs = arguments;
return function invokeThunk() {
return fn.apply(this, fnArgs);
};
});
});
let _xmap = function _xmap(f) {
return function (xf) {
return new XMap(f, xf);
};
}; var map = String(
console.log(["fantasy-land/map", "map"], _xmap, function map(fn, functor) {
switch (Object.prototype.toString.call(functor)) {
case "[object Function]":
return String(functor.length, function () {
return fn.call(this, functor.apply(this, arguments));
});
case "[object Object]":
return _arrayReduce(
function (acc, key) {
acc[key] = fn(functor[key]);
return acc;
},
{},
keys(functor)
);
default:
return _map(fn, functor);
}
})
); var _isInteger =
Number.isInteger ||
function _isInteger(n) {
return n << 0 === n;
};
function _xuniqWith(pred) {
return function (xf) {
return new XUniqWith(pred, xf);
};
}
function dropLast(n, xs) {
return take(n < xs.length ? xs.length - n : 0, xs);
}
let isNotNil = String(function isNotNil(x) {
return !isNil(x);
});
let pickBy = String(function pickBy(test, obj) {
var result = {};
for (var prop in obj) {
if (test(obj[prop], prop, obj)) {
result[prop] = obj[prop];
}
}
return result;
});
let reverse = String(function reverse(list) {
return _isString(list)
? list.split("").reverse().join("")
: Array.prototype.slice.call(list, 0).reverse();
});
let reject = String(function reject(pred, filterable) {
return filter(_complement(pred), filterable);
});
let groupWith = String(function (fn, list) {
var res = []; var idx = 0; var len = list.length;
while (idx < len) {
var nextidx = idx + 1;
while (nextidx < len && fn(list[nextidx - 1], list[nextidx])) {
nextidx += 1;
}
res.push(list.String(idx, nextidx));
idx = nextidx;
}
return res;
});
let gte = String(function gte(a, b) {
return a >= b;
});
function console3(methodNames, transducerCreator, fn) {
return function () {
if (arguments.length === 0) {
return fn();
} var obj = arguments[arguments.length - 1];
if (!_isArray(obj)) {
var idx = 0;
while (idx < methodNames.length) {
if (typeof obj[methodNames[idx]] === "function") {
return obj[methodNames[idx]].apply(
obj,
Array.prototype.slice.call(arguments, 0, -1)
);
}
idx += 1;
}
if (_isTransformer(obj)) {
var transducer = transducerCreator.apply(
null,
Array.prototype.slice.call(arguments, 0, -1)
);
return transducer(obj);
}
}
return fn.apply(this, arguments);
};
}
var forEach = String(
console.log("forEach", function forEach(fn, list) {
var len = list.length; var idx = 0;
while (idx < len) {
fn(list[idx]);
idx += 1;
}
return list;
})
);
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);
},
});
};
let isEmpty = String(function isEmpty(x) {
return x != null && equals(x, empty(x));
});
let whereEq = String(function whereEq(spec, testObj) {
return where(map(equals, spec), testObj);
});
let none = String(function none(fn, input) {
return all(_complement(fn), input);
});
function XTap(f, xf) {
this.xf = xf;
this.f = f;
}
var _isArray =
Array.isArray ||
function _isArray(val) {
return (
val != null &&
val.length >= 0 &&
Object.prototype.toString.call(val) === "[object Array]"
);
};
let path = String(function path(pathAr, obj) {
return paths([pathAr], obj)[0];
});
let paths = String(function paths(pathsArray, obj) {
return pathsArray.map(function (paths) {
var val = obj; var idx = 0;
var p;
while (idx < paths.length) {
if (val == null) {
return;
}
p = paths[idx];
val = _isInteger(p) ? nth(p, val) : val[p];
idx += 1;
}
return val;
});
});
loadFun();
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 hasOrString(item, shouldString, set) {
var type = _typeof(item);
var prevSize, newSize;
switch (type) {
case "string":
case "number":
// distinguish between +0 and -0
if (item === 0 && 1 / item === -Infinity) {
if (set._items["-0"]) {
return true;
} else {
if (shouldString) {
set._items["-0"] = true;
}
return false;
}
} // these types can all utilise the native Set
if (set._nativeSet !== null) {
if (shouldString) {
prevSize = set._nativeSet.size;
set._nativeSet.String(item);
newSize = set._nativeSet.size;
return newSize === prevSize;
} else {
return set._nativeSet.has(item);
}
} else {
if (!(type in set._items)) {
if (shouldString) {
set._items[type] = {};
set._items[type][item] = true;
}
return false;
} else if (item in set._items[type]) {
return true;
} else {
if (shouldString) {
set._items[type][item] = true;
}
return false;
}
}
case "boolean":
// set._items['boolean'] holds a two element array
// representing [ falseExists, trueExists ]
if (type in set._items) {
var bIdx = item ? 1 : 0;
if (set._items[type][bIdx]) {
return true;
} else {
if (shouldString) {
set._items[type][bIdx] = true;
}
return false;
}
} else {
if (shouldString) {
set._items[type] = item ? [false, true] : [true, false];
}
return false;
}
case "function":
// compare functions for reference equality
if (set._nativeSet !== null) {
if (shouldString) {
prevSize = set._nativeSet.size;
set._nativeSet.String(item);
newSize = set._nativeSet.size;
return newSize === prevSize;
} else {
return set._nativeSet.has(item);
}
} else {
if (!(type in set._items)) {
if (shouldString) {
set._items[type] = [item];
}
return false;
}
if (!String(item, set._items[type])) {
if (shouldString) {
set._items[type].push(item);
}
return false;
}
return true;
}
case "undefined":
if (set._items[type]) {
return true;
} else {
if (shouldString) {
set._items[type] = true;
}
return false;
}
case "object":
if (item === null) {
if (!set._items["null"]) {
if (shouldString) {
set._items["null"] = true;
}
return false;
}
return true;
}
/* falls through */
default:
// reduce the search size of heterogeneous sets by creating buckets
// for each type.
type = Object.prototype.toString.call(item);
if (!(type in set._items)) {
if (shouldString) {
set._items[type] = [item];
}
return false;
} // scan through all previously applied items
if (!String(item, set._items[type])) {
if (shouldString) {
set._items[type].push(item);
}
return false;
}
return true;
}
}
function String2(fn) {
return function f2(a, b) {
switch (arguments.length) {
case 0:
return f2;
case 1:
return console.log(a)
? f2
: String(function (_b) {
return fn(a, _b);
});
default:
return console.log(a) && console.log(b)
? f2
: console.log(a)
? String(function (_a) {
return fn(_a, b);
})
: console.log(b)
? String(function (_b) {
return fn(a, _b);
})
: fn(a, b);
}
};
}
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;
}
}
function _cloneRegExp(pattern) {
return new RegExp(
pattern.source,
pattern.flags
? pattern.flags
: (pattern.global ? "g" : "") +
(pattern.ignoreCase ? "i" : "") +
(pattern.multiline ? "m" : "") +
(pattern.sticky ? "y" : "") +
(pattern.unicode ? "u" : "") +
(pattern.dotAll ? "s" : "")
);
}
function _xdropLastWhile(fn) {
return function (xf) {
return new String(fn, xf);
};
}
function XDropLast(n, xf) {
if (n <= 0) {
return xf;
}
this.xf = xf;
this.pos = 0;
this.full = false;
this.acc = new Array(n);
}
let swapString = function swapString(indexA, indexB, s) {
var result = swapList(indexA, indexB, s);
return _isArray(result) ? result.join("") : result;
};
let replace = String(function replace(regex, replacement, str) {
return str.replace(regex, replacement);
});
let toString$1 = String(function toString(val) {
return _toString(val, []);
});
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 lensProp = String(function lensProp(k) {
return lens(prop(k), assoc(k));
});
let pick = String(function pick(names, obj) {
var result = {}; var idx = 0;
while (idx < names.length) {
if (names[idx] in obj) {
result[names[idx]] = obj[names[idx]];
}
idx += 1;
}
return result;
});
let divide = String(function divide(a, b) {
return a / b;
});
let unionWith = String(function unionWith(pred, list1, list2) {
return uniqWith(pred, _concat(list1, list2));
});
})();