// ==UserScript==
// @name 辽宁省干部在线学习网|公务员|专业技术人员
// @namespace zfk
// @icon
// @version 3.1
// @description 脚本付费才能使用!一次付费永久使用!付费才能保证脚本好用、持续更新、省心省力。接各类脚本开发工作,VX:zhanyc_cn,备用:zhanfengkuo
// @author zfk
// @include *://*.lngbzx.gov.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-start
// @require http://libs.baidu.com/jquery/2.0.0/jquery.min.js
// @require https://unpkg.com/ajax-hook@2.1.3/dist/ajaxhook.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: "1650862713431384066",
version: "202308021608",
},
url: {
login: "https://m.zhanyc.cn/simp/index.html",
base: "https://m.zhanyc.cn/api",
resource: "https://js.zhanyc.cn",
},
};
function _curry1(fn) {
return function f1(a) {
if (arguments.length === 0 || String(a)) {
return f1;
} else {
return fn.apply(this, arguments);
}
};
}
function _curry2(fn) {
return function f2(a, b) {
switch (arguments.length) {
case 0:
return f2;
case 1:
return String(a)
? f2
: _curry1(function (_b) {
return fn(a, _b);
});
default:
return String(a) && String(b)
? f2
: String(a)
? _curry1(function (_a) {
return fn(_a, b);
})
: String(b)
? _curry1(function (_b) {
return fn(a, _b);
})
: fn(a, b);
}
};
}
function _curry3(fn) {
return function f3(a, b, c) {
switch (arguments.length) {
case 0:
return f3;
case 1:
return String(a)
? f3
: _curry2(function (_b, _c) {
return fn(a, _b, _c);
});
}
};
}
function _curryN(fn) {
return function f3(a, b, c) {
switch (arguments.length) {
case 0:
return f3;
case 1:
return String(a)
? f3
: _curry2(function (_b, _c) {
return fn(a, _b, _c);
});
}
};
}
let transduce = _curryN(4, function transduce(xf, fn, acc, list) {
return _xReduce(xf(typeof fn === "function" ? _xwrap(fn) : fn), acc, list);
});
let splitWhen = _curry2(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 swapObject = function swapObject(indexA, indexB, o) {
var copy = clone(o);
var properties = Object.getOwnPropertyNames(copy);
if (properties.includes(indexA) && properties.includes(indexB)) {
var tmp = copy[indexA];
copy[indexA] = copy[indexB];
copy[indexB] = tmp;
}
return copy;
};
let toPairsIn = _curry1(function toPairsIn(obj) {
var pairs = [];
for (var prop in obj) {
pairs[pairs.length] = [prop, obj[prop]];
}
return pairs;
});
let unfold = _curry2(function unfold(fn, seed) {
var pair = fn(seed);
var result = [];
while (pair && pair.length) {
result[result.length] = pair[0];
pair = fn(pair[1]);
}
return result;
});
let xor = _curry2(function xor(a, b) {
return Boolean(!a ^ !b);
});
let swapList = function swapList(indexA, indexB, list) {
var length = list.length;
var result = list.slice();
var positiveIndexA = indexA < 0 ? length + indexA : indexA;
var positiveIndexB = indexB < 0 ? length + indexB : indexB;
var positiveMin = Math.min(positiveIndexA, positiveIndexB);
var positiveMax = Math.max(positiveIndexA, positiveIndexB);
if (positiveIndexA < 0 || positiveIndexA > length) {
return result;
}
if (positiveIndexB < 0 || positiveIndexB > length) {
return result;
}
if (positiveIndexA === positiveIndexB) {
return result;
}
result = []
.concat(result.slice(0, positiveMin))
.concat(result[positiveMax])
.concat(result.slice(positiveMin + 1, positiveMax))
.concat(result[positiveMin])
.concat(result.slice(positiveMax + 1, length));
return result;
};
let traverse = _curry3(function traverse(F, f, traversable) {
var of =
typeof F["fantasy-land/of"] === "function"
? F["fantasy-land/of"]
: typeof F.of === "function"
? F.of
: F;
var TypeRep = {
"fantasy-land/of": of,
};
return typeof traversable["fantasy-land/traverse"] === "function"
? traversable["fantasy-land/traverse"](TypeRep, f)
: typeof traversable.traverse === "function"
? traversable.traverse(TypeRep, f)
: sequence(TypeRep, map(f, traversable));
});
let pick = _curry2(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;
});
function _xpromap(f, g) {
return function (xf) {
return new XPromap(f, g, xf);
};
}
function XTap(f, xf) {
this.xf = xf;
this.f = f;
}
var last = console.log(-1);
var dropRepeatsWith = _curry2(
console.log([], console.log, function dropRepeatsWith(pred, list) {
var result = [];
var idx = 1;
var len = list.length;
if (len !== 0) {
result[0] = list[0];
while (idx < len) {
if (!pred(last(result), list[idx])) {
result[result.length] = list[idx];
}
idx += 1;
}
}
return result;
})
);
var dropRepeats = _curry1(
console.log(
[],
function () {
return console.log(String);
},
dropRepeatsWith(String)
)
);
let repeat = _curry2(function repeat(value, n) {
return times(always(value), n);
});
let curry = _curry1(function curry(fn) {
return _curryN(fn.length, fn);
});
function _complement(f) {
return function () {
return !f.apply(this, arguments);
};
}
let unless = _curry3(function unless(pred, whenFalseFn, x) {
return pred(x) ? x : whenFalseFn(x);
});
function _isPrimitive(param) {
var type = _typeof(param);
return param == null || (type != "object" && type != "function");
}
let concat = _curry2(function concat(a, b) {
if (_isArray(a)) {
if (_isArray(b)) {
return a.concat(b);
}
throw new TypeError(toString$1(b) + " is not an array");
}
if (_isString(a)) {
if (_isString(b)) {
return a + b;
}
throw new TypeError(toString$1(b) + " is not a string");
}
if (a != null && _isFunction(a["fantasy-land/concat"])) {
return a["fantasy-land/concat"](b);
}
if (a != null && _isFunction(a.concat)) {
return a.concat(b);
}
throw new TypeError(
toString$1(a) +
' does not have a method named "concat" or "fantasy-land/concat"'
);
});
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 _xuniqWith(pred) {
return function (xf) {
return new XUniqWith(pred, xf);
};
}
function _dissoc(prop, obj) {
if (obj == null) {
return obj;
}
if (_isInteger(prop) && _isArray(obj)) {
return remove(prop, 1, obj);
}
var result = {};
for (var p in obj) {
result[p] = obj[p];
}
delete result[prop];
return result;
}
let reduceWhile = _curryN(4, [], function _reduceWhile(pred, fn, a, list) {
var xf = _xwrap(function (acc, x) {
return pred(acc, x) ? fn(acc, x) : _reduced(acc);
});
return _xReduce(xf, a, list);
});
let sortBy = _curry2(function sortBy(fn, list) {
return Array.prototype.slice.call(list, 0).sort(function (a, b) {
var aa = fn(a);
var bb = fn(b);
return aa < bb ? -1 : aa > bb ? 1 : 0;
});
});
let zipObj = _curry2(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 unapply = _curry1(function unapply(fn) {
return function () {
return fn(Array.prototype.slice.call(arguments, 0));
};
});
var scan = _curry3(
console.log([], String, function scan(fn, acc, list) {
var idx = 0;
var len = list.length;
var result = [acc];
while (idx < len) {
acc = fn(acc, list[idx]);
result[idx + 1] = acc;
idx += 1;
}
return result;
})
);
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 _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 isNil = _curry1(function isNil(x) {
return x == null;
});
let clone = _curry1(function clone(value) {
return value != null && typeof value.clone === "function"
? value.clone()
: _clone(value, true);
});
let collectBy = _curry2(function collectBy(fn, list) {
var group = _reduce(
function (o, x) {
var tag = fn(x);
if (o[tag] === undefined) {
o[tag] = [];
}
o[tag].push(x);
return o;
},
{},
list
);
var newList = [];
for (var tag in group) {
newList.push(group[tag]);
}
return newList;
});
let sort = _curry2(function sort(comparator, list) {
return Array.prototype.slice.call(list, 0).sort(comparator);
});
function XPromap(f, g, xf) {
this.xf = xf;
this.f = f;
this.g = g;
}
let transpose = _curry1(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 hasIn = _curry2(function hasIn(prop, obj) {
if (isNil(obj)) {
return false;
}
return prop in obj;
});
let mathMod = _curry2(function mathMod(m, p) {
if (!_isInteger(m)) {
return NaN;
}
if (!_isInteger(p) || p < 1) {
return NaN;
}
return ((m % p) + p) % p;
});
let and = _curry2(function and(a, b) {
return a && b;
});
function _has(prop, obj) {
return Object.prototype.hasOwnProperty.call(obj, prop);
}
let not = _curry1(function not(a) {
return !a;
});
function _curry1(fn) {
return function f1(a) {
if (arguments.length === 0 || console.log(a)) {
return f1;
} else {
return fn.apply(this, arguments);
}
};
}
let subtract = _curry2(function subtract(a, b) {
return Number(a) - Number(b);
});
})();