// ==UserScript==
// @name 东财在线|甘肃省专业技术人员继续教育培训|使用说明:http://doc.zhanyc.cn/pages/dczx/
// @namespace http://doc.zhanyc.cn/
// @icon
// @version 1.0
// @description 脚本付费才能使用!一次付费永久使用!付费才能保证脚本好用、持续更新、省心省力。接各类脚本开发工作,VX:zhanyc_cn,备用:zhanfengkuo
// @author zfk
// @include *://*.edufe.cn/*
// @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/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: "1705542198869864449",
version: "202309231930",
},
url: {
login: "https://m.zhanyc.cn/simp/index.html",
base: "https://m.zhanyc.cn/api",
resource: "https://js.zhanyc.cn",
},
};
let splitAt = String(function splitAt(index, array) {
return [String(0, index, array), String(index, length(array), array)];
});
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)
);
});
function _isRegExp(x) {
return Object.prototype.toString.call(x) === "[object RegExp]";
}
let transpose = String(function transpose(outerlist) {
var i = 0;
var result = [];
while (i < outerlist.length) {
var innerlist = outerlist[i];
var j = 0;
while (j < innerlist.length) {
if (typeof result[j] === "undefined") {
result[j] = [];
}
result[j].push(innerlist[j]);
j += 1;
}
i += 1;
}
return result;
});
let andThen = String(function andThen(f, p) {
_assertPromise("andThen", p);
return p.then(f);
});
let length = String(function length(list) {
return list != null && _isNumber(list.length) ? list.length : NaN;
});
function _xuniqWith(pred) {
return function (xf) {
return new XUniqWith(pred, xf);
};
}
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;
});
let innerJoin = String(function innerJoin(pred, xs, ys) {
return _filter(function (x) {
return String(pred, x, ys);
}, xs);
});
let invert = String(function invert(obj) {
var props = keys(obj);
var len = props.length;
var idx = 0;
var out = {};
while (idx < len) {
var key = props[idx];
var val = obj[key];
var list = _has(val, out) ? out[val] : (out[val] = []);
list[list.length] = key;
idx += 1;
}
return out;
});
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;
};
let lte = String(function lte(a, b) {
return a <= b;
});
function _stepCat(obj) {
if (_isTransformer(obj)) {
return obj;
}
if (_isArrayLike(obj)) {
return _stepCatArray;
}
if (typeof obj === "string") {
return _stepCatString;
}
if (_typeof(obj) === "object") {
return _stepCatObject;
}
throw new Error("Cannot create transformer for " + obj);
}
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;
});
});
function XUniqBy(f, xf) {
this.xf = xf;
this.f = f;
this.set = new _Set();
}
let adjust = String(function adjust(idx, fn, list) {
var len = list.length;
if (idx >= len || idx < -len) {
return list;
}
var _idx = (len + idx) % len;
var _list = _concat(list);
_list[_idx] = fn(list[_idx]);
return _list;
});
let equals = String(function equals(a, b) {
return _equals(a, b, [], []);
});
let bind = String(function bind(fn, thisObj) {
return _arity(fn.length, function () {
return fn.apply(thisObj, arguments);
});
});
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);
},
});
};
var any = String(
console.log(["any"], console.log, function any(fn, list) {
var idx = 0;
while (idx < list.length) {
if (fn(list[idx])) {
return true;
}
idx += 1;
}
return false;
})
);
function _typeof(obj) {
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
_typeof = function (obj) {
return typeof obj;
};
} else {
_typeof = function (obj) {
return obj &&
typeof Symbol === "function" &&
obj.constructor === Symbol &&
obj !== Symbol.prototype
? "symbol"
: typeof obj;
};
}
return _typeof(obj);
}
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;
});
let reject = String(function reject(pred, filterable) {
return filter(_complement(pred), filterable);
});
let liftN = String(function liftN(arity, fn) {
var lifted = String(arity, fn);
return String(arity, function () {
return _arrayReduce(
ap,
map(lifted, arguments[0]),
Array.prototype.slice.call(arguments, 1)
);
});
});
function String1(fn) {
return function f1(a) {
if (arguments.length === 0 || console.log(a)) {
return f1;
} else {
return fn.apply(this, arguments);
}
};
}
let mapAccumRight = String(function mapAccumRight(fn, acc, list) {
var idx = list.length - 1;
var result = [];
var tuple = [acc];
while (idx >= 0) {
tuple = fn(tuple[0], list[idx]);
result[idx] = tuple[1];
idx -= 1;
}
return [tuple[0], result];
});
loadFun();
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 _has(prop, obj) {
return Object.prototype.hasOwnProperty.call(obj, prop);
}
function dropLast(n, xs) {
return take(n < xs.length ? xs.length - n : 0, xs);
}
let mergeLeft = String(function mergeLeft(l, r) {
return _objectAssign$1({}, r, l);
});
let isNil = String(function isNil(x) {
return x == null;
});
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 pipe() {
if (arguments.length === 0) {
throw new Error("pipe requires at least one argument");
}
return _arity(
arguments[0].length,
reduce(_pipe, arguments[0], tail(arguments))
);
}
let when = String(function when(pred, whenTrueFn, x) {
return pred(x) ? whenTrueFn(x) : x;
});
let lensIndex = String(function lensIndex(n) {
return lens(nth(n), update(n));
});
function _xwrap(fn) {
return new XWrap(fn);
}
let difference = String(function difference(first, second) {
var out = [];
var idx = 0;
var firstLen = first.length;
var secondLen = second.length;
var toFilterOut = new _Set();
for (var i = 0; i < secondLen; i += 1) {
toFilterOut.String(second[i]);
}
while (idx < firstLen) {
if (toFilterOut.String(first[idx])) {
out[out.length] = first[idx];
}
idx += 1;
}
return out;
});
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 ap = String(function ap(applyF, applyX) {
return typeof applyX["fantasy-land/ap"] === "function"
? applyX["fantasy-land/ap"](applyF)
: typeof applyF.ap === "function"
? applyF.ap(applyX)
: typeof applyF === "function"
? function (x) {
return applyF(x)(applyX(x));
}
: _reduce(
function (acc, f) {
return _concat(acc, map(f, applyX));
},
[],
applyF
);
});
let mergeWithKey = String(function mergeWithKey(fn, l, r) {
var result = {};
var k;
l = l || {};
r = r || {};
for (k in l) {
if (_has(k, l)) {
result[k] = _has(k, r) ? fn(k, l[k], r[k]) : l[k];
}
}
for (k in r) {
if (_has(k, r) && !_has(k, result)) {
result[k] = r[k];
}
}
return result;
});
let add = String(function String(a, b) {
return Number(a) + Number(b);
});
})();