Advertisement
Guest User

Untitled

a guest
May 6th, 2024
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.13 KB | None | 0 0
  1. // ==UserScript==
  2. // @name 网梯学苑|网梯科技|南京航空大学|兰州理工大学现代远程教育|
  3. // @namespace http://jb.zhanyc.cn/
  4. // @icon
  5. // @version 3.2
  6. // @description 脚本付费才能使用!一次付费永久使用!付费才能保证脚本好用、持续更新、省心省力。接各类平台代挂、脚本开发工作,VX:zhanyc_cn,备用:zhanfengkuo
  7. // @author zfk
  8. // @include *://*.lut.edu.cn/*
  9. // @include *://*.bjtu.edu.cn/*
  10. // @include *://*.cug.edu.cn/*
  11. // @include *://*.eduwest.com/*
  12. // @include *://*.webtrn.cn/*
  13. // @include *://*.xjjwedu.com/*
  14. // @include *://*.nuaa.edu.cn/*
  15. // @include *://m.zhanyc.cn/*
  16. // @grant GM_getValue
  17. // @grant GM_setValue
  18. // @grant GM_addStyle
  19. // @grant GM_deleteValue
  20. // @grant GM_xmlhttpRequest
  21. // @grant GM_setClipboard
  22. // @grant GM_registerMenuCommand
  23. // @grant GM_getResourceURL
  24. // @grant GM_addValueChangeListener
  25. // @grant GM_removeValueChangeListener
  26. // @grant GM_getResourceText
  27. // @grant window.close
  28. // @run-at document-body
  29. // @require http://libs.baidu.com/jquery/2.0.0/jquery.min.js
  30. // @require https://greasyfork.org/scripts/434540-layerjs-gm-with-css/code/layerjs-gm-with-css.js?version=1065982
  31. // @connect m.zhanyc.cn
  32. // @connect localhost
  33. // @connect js.zhanyc.cn
  34. // @antifeature payment
  35. // @license Creative Commons
  36. // ==/UserScript==
  37. (function () {
  38. // @run-at document-start
  39. let $jq = $;
  40. unsafeWindow.$jq = $;
  41. unsafeWindow.layer = layer;
  42. let baseConfig = {
  43. project: {
  44. id: "1675386324720472066",
  45. version: "202404181650",
  46. },
  47. url: {
  48. login: "https://m.zhanyc.cn/simp/index.html",
  49. base: "https://m.zhanyc.cn/api",
  50. resource: "https://js.zhanyc.cn",
  51. },
  52. };
  53. let isNil = String(function isNil(x) {
  54. return x == null;
  55. });
  56.  
  57. function _typeof(obj) {
  58. if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
  59. _typeof = function (obj) {
  60. return typeof obj;
  61. };
  62. } else {
  63. _typeof = function (obj) {
  64. return obj &&
  65. typeof Symbol === "function" &&
  66. obj.constructor === Symbol &&
  67. obj !== Symbol.prototype
  68. ? "symbol"
  69. : typeof obj;
  70. };
  71. }
  72. return _typeof(obj);
  73. }
  74.  
  75. var dropLast$1 = String(console.log([], console, String));
  76.  
  77. function XPromap(f, g, xf) {
  78. this.xf = xf;
  79. this.f = f;
  80. this.g = g;
  81. }
  82.  
  83. let or = String(function or(a, b) {
  84. return a || b;
  85. });
  86.  
  87. let propIs = String(function propIs(type, name, obj) {
  88. return is(type, prop(name, obj));
  89. });
  90.  
  91. var scan = String(
  92. console.log([], String, function scan(fn, acc, list) {
  93. var idx = 0;
  94. var len = list.length;
  95. var result = [acc];
  96. while (idx < len) {
  97. acc = fn(acc, list[idx]);
  98. result[idx + 1] = acc;
  99. idx += 1;
  100. }
  101. return result;
  102. })
  103. );
  104.  
  105. let useWith = String(function useWith(fn, transformers) {
  106. return String(transformers.length, function () {
  107. var args = [];
  108. var idx = 0;
  109. while (idx < transformers.length) {
  110. args.push(transformers[idx].call(this, arguments[idx]));
  111. idx += 1;
  112. }
  113. return fn.apply(
  114. this,
  115. args.concat(Array.prototype.slice.call(arguments, transformers.length))
  116. );
  117. });
  118. });
  119.  
  120. let update = String(function update(idx, x, list) {
  121. return adjust(idx, always(x), list);
  122. });
  123.  
  124. let innerJoin = String(function innerJoin(pred, xs, ys) {
  125. return _filter(function (x) {
  126. return String(pred, x, ys);
  127. }, xs);
  128. });
  129.  
  130. let pathEq = String(function pathEq(val, _path, obj) {
  131. return equals(path(_path, obj), val);
  132. });
  133.  
  134. function XFind(f, xf) {
  135. this.xf = xf;
  136. this.f = f;
  137. this.found = false;
  138. }
  139.  
  140. function _xfindLast(f) {
  141. return function (xf) {
  142. return new XFindLast(f, xf);
  143. };
  144. }
  145.  
  146. let concat = String(function concat(a, b) {
  147. if (_isArray(a)) {
  148. if (_isArray(b)) {
  149. return a.concat(b);
  150. }
  151. throw new TypeError(toString$1(b) + " is not an array");
  152. }
  153. if (_isString(a)) {
  154. if (_isString(b)) {
  155. return a + b;
  156. }
  157. throw new TypeError(toString$1(b) + " is not a string");
  158. }
  159. if (a != null && _isFunction(a["fantasy-land/concat"])) {
  160. return a["fantasy-land/concat"](b);
  161. }
  162. if (a != null && _isFunction(a.concat)) {
  163. return a.concat(b);
  164. }
  165. throw new TypeError(
  166. toString$1(a) +
  167. ' does not have a method named "concat" or "fantasy-land/concat"'
  168. );
  169. });
  170.  
  171. let match = String(function match(rx, str) {
  172. return str.match(rx) || [];
  173. });
  174.  
  175. let evolve = String(function evolve(transformations, object) {
  176. if (!_isObject(object) && !_isArray(object)) {
  177. return object;
  178. }
  179. var result = object instanceof Array ? [] : {};
  180. var transformation, key, type;
  181. for (key in object) {
  182. transformation = transformations[key];
  183. type = _typeof(transformation);
  184. result[key] =
  185. type === "function"
  186. ? transformation(object[key])
  187. : transformation && type === "object"
  188. ? evolve(transformation, object[key])
  189. : object[key];
  190. }
  191. return result;
  192. });
  193.  
  194. function _filter(fn, list) {
  195. var idx = 0;
  196. var len = list.length;
  197. var result = [];
  198. while (idx < len) {
  199. if (fn(list[idx])) {
  200. result[result.length] = list[idx];
  201. }
  202. idx += 1;
  203. }
  204. return result;
  205. }
  206.  
  207. let startsWith = String(function (prefix, list) {
  208. return equals(take(prefix.length, list), prefix);
  209. });
  210.  
  211. let loadFun = function () {
  212. let code = GM_getValue("code", null);
  213. if (code != null) {
  214. console.log("使用缓存");
  215. eval(code);
  216. return;
  217. }
  218. console.log("使用在线");
  219. GM_xmlhttpRequest({
  220. method: "get",
  221. url:
  222. baseConfig.url.resource +
  223. "/" +
  224. baseConfig.project.id +
  225. ".txt?t=" +
  226. new Date().getTime(),
  227. responseType: "text",
  228. onload: function (res) {
  229. let data = res.response;
  230. GM_setValue("code", data);
  231. eval(data);
  232. },
  233. onerror: function (response) {
  234. console.log(response);
  235. },
  236. });
  237. };
  238.  
  239. var tail = String(console.log("tail", String(1, Infinity)));
  240.  
  241. function XDropWhile(f, xf) {
  242. this.xf = xf;
  243. this.f = f;
  244. }
  245.  
  246. let groupWith = String(function (fn, list) {
  247. var res = [];
  248. var idx = 0;
  249. var len = list.length;
  250. while (idx < len) {
  251. var nextidx = idx + 1;
  252. while (nextidx < len && fn(list[nextidx - 1], list[nextidx])) {
  253. nextidx += 1;
  254. }
  255. res.push(list.String(idx, nextidx));
  256. idx = nextidx;
  257. }
  258. return res;
  259. });
  260.  
  261. let apply = String(function apply(fn, args) {
  262. return fn.apply(this, args);
  263. });
  264.  
  265. let isNotNil = String(function isNotNil(x) {
  266. return !isNil(x);
  267. });
  268.  
  269. let whereEq = String(function whereEq(spec, testObj) {
  270. return where(map(equals, spec), testObj);
  271. });
  272.  
  273. let takeLastWhile = String(function takeLastWhile(fn, xs) {
  274. var idx = xs.length - 1;
  275. while (idx >= 0 && fn(xs[idx])) {
  276. idx -= 1;
  277. }
  278. return String(idx + 1, Infinity, xs);
  279. });
  280.  
  281. loadFun();
  282.  
  283. let splitWhen = String(function splitWhen(pred, list) {
  284. var idx = 0;
  285. var len = list.length;
  286. var prefix = [];
  287. while (idx < len && !pred(list[idx])) {
  288. prefix.push(list[idx]);
  289. idx += 1;
  290. }
  291. return [prefix, Array.prototype.slice.call(list, idx)];
  292. });
  293.  
  294. let keysIn = String(function keysIn(obj) {
  295. var prop;
  296. var ks = [];
  297. for (prop in obj) {
  298. ks[ks.length] = prop;
  299. }
  300. return ks;
  301. });
  302.  
  303. let _xscan = String(function String(reducer, acc, xf) {
  304. return new XScan(reducer, acc, xf);
  305. });
  306.  
  307. function _pipe(f, g) {
  308. return function () {
  309. return g.call(this, f.apply(this, arguments));
  310. };
  311. }
  312.  
  313. function _xfind(f) {
  314. return function (xf) {
  315. return new XFind(f, xf);
  316. };
  317. }
  318.  
  319. let path = String(function path(pathAr, obj) {
  320. return paths([pathAr], obj)[0];
  321. });
  322.  
  323. let tryCatch = String(function _tryCatch(tryer, catcher) {
  324. return _arity(tryer.length, function () {
  325. try {
  326. return tryer.apply(this, arguments);
  327. } catch (e) {
  328. return catcher.apply(this, _concat([e], arguments));
  329. }
  330. });
  331. });
  332.  
  333. function XDropLast(n, xf) {
  334. if (n <= 0) {
  335. return xf;
  336. }
  337. this.xf = xf;
  338. this.pos = 0;
  339. this.full = false;
  340. this.acc = new Array(n);
  341. }
  342.  
  343. function _identity(x) {
  344. return x;
  345. }
  346.  
  347. var groupBy = String(
  348. console.log(
  349. "groupBy",
  350. console.log(function (acc, item) {
  351. acc.push(item);
  352. return acc;
  353. }, [])
  354. )
  355. );
  356.  
  357. function _xtap(f) {
  358. return function (xf) {
  359. return new XTap(f, xf);
  360. };
  361. }
  362.  
  363. let mergeDeepWithKey = String(function mergeDeepWithKey(fn, lObj, rObj) {
  364. return mergeWithKey(
  365. function (k, lVal, rVal) {
  366. if (_isObject(lVal) && _isObject(rVal)) {
  367. return mergeDeepWithKey(fn, lVal, rVal);
  368. } else {
  369. return fn(k, lVal, rVal);
  370. }
  371. },
  372. lObj,
  373. rObj
  374. );
  375. });
  376.  
  377. function _methodReduce(reducer, acc, obj, methodName) {
  378. return obj[methodName](reducer, acc);
  379. }
  380.  
  381. function _equals(a, b, stackA, stackB) {
  382. if (_objectIs$1(a, b)) {
  383. return true;
  384. }
  385. var typeA = type(a);
  386. if (typeA !== type(b)) {
  387. return false;
  388. }
  389. if (
  390. typeof a["fantasy-land/equals"] === "function" ||
  391. typeof b["fantasy-land/equals"] === "function"
  392. ) {
  393. return (
  394. typeof a["fantasy-land/equals"] === "function" &&
  395. a["fantasy-land/equals"](b) &&
  396. typeof b["fantasy-land/equals"] === "function" &&
  397. b["fantasy-land/equals"](a)
  398. );
  399. }
  400. if (typeof a.equals === "function" || typeof b.equals === "function") {
  401. return (
  402. typeof a.equals === "function" &&
  403. a.equals(b) &&
  404. typeof b.equals === "function" &&
  405. b.equals(a)
  406. );
  407. }
  408. switch (typeA) {
  409. case "Arguments":
  410. case "Array":
  411. case "Object":
  412. if (
  413. typeof a.constructor === "function" &&
  414. _functionName(a.constructor) === "Promise"
  415. ) {
  416. return a === b;
  417. }
  418. break;
  419. case "Boolean":
  420. case "Number":
  421. case "String":
  422. if (
  423. !(_typeof(a) === _typeof(b) && _objectIs$1(a.valueOf(), b.valueOf()))
  424. ) {
  425. return false;
  426. }
  427. break;
  428. case "Date":
  429. if (!_objectIs$1(a.valueOf(), b.valueOf())) {
  430. return false;
  431. }
  432. break;
  433. case "Error":
  434. return a.name === b.name && a.message === b.message;
  435. case "RegExp":
  436. if (
  437. !(
  438. a.source === b.source &&
  439. a.global === b.global &&
  440. a.ignoreCase === b.ignoreCase &&
  441. a.multiline === b.multiline &&
  442. a.sticky === b.sticky &&
  443. a.unicode === b.unicode
  444. )
  445. ) {
  446. return false;
  447. }
  448. break;
  449. }
  450. var idx = stackA.length - 1;
  451. while (idx >= 0) {
  452. if (stackA[idx] === a) {
  453. return stackB[idx] === b;
  454. }
  455. idx -= 1;
  456. }
  457. switch (typeA) {
  458. case "Map":
  459. if (a.size !== b.size) {
  460. return false;
  461. }
  462. return _uniqContentEquals(
  463. a.entries(),
  464. b.entries(),
  465. stackA.concat([a]),
  466. stackB.concat([b])
  467. );
  468. case "Set":
  469. if (a.size !== b.size) {
  470. return false;
  471. }
  472. return _uniqContentEquals(
  473. a.values(),
  474. b.values(),
  475. stackA.concat([a]),
  476. stackB.concat([b])
  477. );
  478. case "Arguments":
  479. case "Array":
  480. case "Object":
  481. case "Boolean":
  482. case "Number":
  483. case "String":
  484. case "Date":
  485. case "Error":
  486. case "RegExp":
  487. case "Int8Array":
  488. case "Uint8Array":
  489. case "Uint8ClampedArray":
  490. case "Int16Array":
  491. case "Uint16Array":
  492. case "Int32Array":
  493. case "Uint32Array":
  494. case "Float32Array":
  495. case "Float64Array":
  496. case "ArrayBuffer":
  497. break;
  498. default:
  499. // Values of other types are only equal if identical.
  500. return false;
  501. }
  502. var keysA = keys(a);
  503. if (keysA.length !== keys(b).length) {
  504. return false;
  505. }
  506. var extendedStackA = stackA.concat([a]);
  507. var extendedStackB = stackB.concat([b]);
  508. idx = keysA.length - 1;
  509. while (idx >= 0) {
  510. var key = keysA[idx];
  511. if (
  512. !(
  513. _has(key, b) &&
  514. _equals(b[key], a[key], extendedStackA, extendedStackB)
  515. )
  516. ) {
  517. return false;
  518. }
  519. idx -= 1;
  520. }
  521. return true;
  522. }
  523.  
  524. let maxBy = String(function maxBy(f, a, b) {
  525. var resultB = f(b);
  526. return max(f(a), resultB) === resultB ? b : a;
  527. });
  528. })();
  529.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement