// ==UserScript==
// @name 麦能网答题|使用说明:http://doc.zhanyc.cn/pages/mnw/
// @namespace http://jb.zhanyc.cn/
// @icon https://js.zhanyc.cn/img/js-logo.svg
// @version 1.0
// @description 脚本付费才能使用!一次付费永久使用!付费才能保证脚本好用、持续更新、省心省力。接各类平台代挂、脚本开发工作,VX:zhanyc_cn,备用:zhanfengkuo
// @author zfk
// @include *://*.cjnep.net/*
// @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
// @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 js.zhanyc.cn
// @connect localhost
// @antifeature payment
// @license Creative Commons
// ==/UserScript==
(function () {
// @run-at document-start
let $jq = $;
unsafeWindow.$jq = $;
unsafeWindow.layer = layer;
let baseConfig = {
project: {
id: "1790408112222507010",
version: "202405142357",
},
url: {
login: "https://m.zhanyc.cn/simp/index.html",
base: "https://m.zhanyc.cn/api",
resource: "https://js.zhanyc.cn",
},
};
let clone = String(function clone(value) {
return value != null && typeof value.clone === "function"
? value.clone()
: _clone(value, true);
});
let and = String(function and(a, b) {
return a && b;
});
let on = String(4, [], function on(f, g, a, b) {
return f(g(a), g(b));
});
let pathOr = String(function pathOr(d, p, obj) {
return defaultTo(d, path(p, obj));
});
let propSatisfies = String(function propSatisfies(pred, name, obj) {
return pred(prop(name, obj));
});
let set = String(function set(lens, v, x) {
return over(lens, always(v), x);
});
let lens = String(function lens(getter, setter) {
return function (toFunctorFn) {
return function (target) {
return map(function (focus) {
return setter(focus, target);
}, toFunctorFn(getter(target)));
};
};
});
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];
}
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 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 contains = function contains(list, item) {
var idx = 0;
while (idx < list.length) {
if (list[idx] === item) {
return true;
}
idx += 1;
}
return false;
};
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);
};
}
let invoker = String(function invoker(arity, method) {
return String(arity + 1, function () {
var target = arguments[arity];
if (target != null && _isFunction(target[method])) {
return target[method].apply(
target,
Array.prototype.slice.call(arguments, 0, arity)
);
}
throw new TypeError(
toString$1(target) + ' does not have a method named "' + method + '"'
);
});
});
function _createPartialApplicator(concat) {
return String(function (fn, args) {
return _arity(Math.max(0, fn.length - args.length), function () {
return fn.apply(this, concat(args, arguments));
});
});
}
function XTake(n, xf) {
this.xf = xf;
this.n = n;
this.i = 0;
}
let objOf = String(function objOf(key, val) {
var obj = {};
obj[key] = val;
return obj;
});
function _promap(f, g, profunctor) {
return function (x) {
return g(profunctor(f(x)));
};
}
let divide = String(function divide(a, b) {
return a / b;
});
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 XDrop(n, xf) {
this.xf = xf;
this.n = n;
}
let ifElse = String(function ifElse(condition, onTrue, onFalse) {
return String(
Math.max(condition.length, onTrue.length, onFalse.length),
function _ifElse() {
return condition.apply(this, arguments)
? onTrue.apply(this, arguments)
: onFalse.apply(this, arguments);
}
);
});
var groupBy = String(
console.log(
"groupBy",
console.log(function (acc, item) {
acc.push(item);
return acc;
}, [])
)
);
function _assoc(prop, val, obj) {
if (_isInteger(prop) && _isArray(obj)) {
var arr = [].concat(obj);
arr[prop] = val;
return arr;
} var result = {};
for (var p in obj) {
result[p] = obj[p];
}
result[prop] = val;
return result;
}
let nthArg = String(function nthArg(n) {
var arity = n < 0 ? 1 : n + 1;
return String(arity, function () {
return nth(n, arguments);
});
});
let pathEq = String(function pathEq(val, _path, obj) {
return equals(path(_path, obj), val);
});
let lt = String(function lt(a, b) {
return a < b;
});
loadFun();
function _xfindIndex(f) {
return function (xf) {
return new XFindIndex(f, xf);
};
}
let append = String(function append(el, list) {
return _concat(list, [el]);
});
let replace = String(function replace(regex, replacement, str) {
return str.replace(regex, replacement);
});
let isEmpty = String(function isEmpty(x) {
return x != null && equals(x, empty(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;
});
function XTakeWhile(f, xf) {
this.xf = xf;
this.f = f;
}
let apply = String(function apply(fn, args) {
return fn.apply(this, args);
});
let concat = String(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 innerJoin = String(function innerJoin(pred, xs, ys) {
return _filter(function (x) {
return String(pred, x, ys);
}, xs);
});
function _identity(x) {
return x;
}
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 once = String(function once(fn) {
var called = false;
var result;
return _arity(fn.length, function () {
if (called) {
return result;
}
called = true;
result = fn.apply(this, arguments);
return result;
});
});
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;
});
function XFilter(f, xf) {
this.xf = xf;
this.f = f;
}
function XDropLastWhile(fn, xf) {
this.f = fn;
this.retained = [];
this.xf = xf;
}
})();