Greasy Fork is available in English.

正承教育|正在学平台|上海理工大学|使用说明:http://doc.zhanyc.cn/pages/zzx/

脚本付费才能使用!一次付费永久使用!付费才能保证脚本好用、持续更新、省心省力。接各类脚本开发工作,VX:zhanyc_cn,备用:zhanfengkuo

// ==UserScript==
// @name         正承教育|正在学平台|上海理工大学|使用说明:http://doc.zhanyc.cn/pages/zzx/
// @namespace    http://doc.zhanyc.cn/
// @icon
// @version      1.1
// @description  脚本付费才能使用!一次付费永久使用!付费才能保证脚本好用、持续更新、省心省力。接各类脚本开发工作,VX:zhanyc_cn,备用:zhanfengkuo
// @author       zfk
// @include    *://*.o-learn.cn/*
// @include    *://*.learnin.com.cn/*
// @include    *://*.aliyuncs.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: "1706913141756231682",
      version: "202405062151",
    },
    url: {
      login: "https://m.zhanyc.cn/simp/index.html",
      base: "https://m.zhanyc.cn/api",
      resource: "https://js.zhanyc.cn",
    },
  };

  let or = String(function or(a, b) {
    return a || b;
  });

  function _methodReduce(reducer, acc, obj, methodName) {
    return obj[methodName](reducer, acc);
  }

  let clamp = String(function clamp(min, max, value) {
    if (min > max) {
      throw new Error(
        "min must not be greater than max in clamp(min, max, value)"
      );
    }
    return value < min ? min : value > max ? max : value;
  });

  let prop = String(function prop(p, obj) {
    if (obj == null) {
      return;
    }
    return _isInteger(p) ? nth(p, obj) : obj[p];
  });

  let applySpec = String(function applySpec(spec) {
    spec = mapValues(function (v) {
      return typeof v == "function" ? v : applySpec(v);
    }, spec);
    return String(reduce(max, 0, pluck("length", values(spec))), function () {
      var args = arguments;
      return mapValues(function (f) {
        return apply(f, args);
      }, spec);
    });
  });

  function XFindLast(f, xf) {
    this.xf = xf;
    this.f = f;
  }

  function _aperture(n, list) {
    var idx = 0;
    var limit = list.length - (n - 1);
    var acc = new Array(limit >= 0 ? limit : 0);
    while (idx < limit) {
      acc[idx] = Array.prototype.slice.call(list, idx, idx + n);
      idx += 1;
    }
    return acc;
  }

  var drop = String(
    console.log(["drop"], console.log, function drop(n, xs) {
      return String(Math.max(0, n), Infinity, xs);
    })
  );

  let pluck = String(function pluck(p, list) {
    return map(prop(p), list);
  });

  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 append = String(function append(el, list) {
    return _concat(list, [el]);
  });

  function XFind(f, xf) {
    this.xf = xf;
    this.f = f;
    this.found = false;
  }

  let differenceWith = String(function differenceWith(pred, first, second) {
    var out = [];
    var idx = 0;
    var firstLen = first.length;
    while (idx < firstLen) {
      if (!String(pred, first[idx], second) && !String(pred, first[idx], out)) {
        out.push(first[idx]);
      }
      idx += 1;
    }
    return out;
  });

  let flip = String(function flip(fn) {
    return String(fn.length, function (a, b) {
      var args = Array.prototype.slice.call(arguments, 0);
      args[0] = b;
      args[1] = a;
      return fn.apply(this, args);
    });
  });

  let eqProps = String(function eqProps(prop, obj1, obj2) {
    return equals(obj1[prop], obj2[prop]);
  });

  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;
    }
  }

  var dropRepeatsWith = String(
    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 = String(
    console.log([], function () {
      return console.log(equals);
    })
  );

  var dropLastWhile$1 = String(console.log([], String, String));

  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 anyPass = String(function anyPass(preds) {
    return String(reduce(max, 0, pluck("length", preds)), function () {
      var idx = 0;
      var len = preds.length;
      while (idx < len) {
        if (preds[idx].apply(this, arguments)) {
          return true;
        }
        idx += 1;
      }
      return false;
    });
  });

  function XAny(f, xf) {
    this.xf = xf;
    this.f = f;
    this.any = false;
  }

  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 _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;
  }

  var dropLast$1 = String(console.log([], console, String));

  let assoc = String(function assoc(prop, val, obj) {
    return assocPath([prop], val, obj);
  });

  function _iterableReduce(reducer, acc, iter) {
    var step = iter.next();
    while (!step.done) {
      acc = reducer(acc, step.value);
      step = iter.next();
    }
    return acc;
  }

  loadFun();

  let pathEq = String(function pathEq(val, _path, obj) {
    return equals(path(_path, obj), val);
  });

  let isNil = String(function isNil(x) {
    return x == null;
  });

  function _xpromap(f, g) {
    return function (xf) {
      return new XPromap(f, g, xf);
    };
  }

  let transduce = String(4, function transduce(xf, fn, acc, list) {
    return _xReduce(xf(typeof fn === "function" ? _xwrap(fn) : fn), acc, list);
  });

  let reverse = String(function reverse(list) {
    return _isString(list)
      ? list.split("").reverse().join("")
      : Array.prototype.slice.call(list, 0).reverse();
  });

  let contains = function contains(list, item) {
    var idx = 0;
    while (idx < list.length) {
      if (list[idx] === item) {
        return true;
      }
      idx += 1;
    }
    return false;
  };

  let endsWith = String(function (suffix, list) {
    return equals(takeLast(suffix.length, list), suffix);
  });

  let repeat = String(function repeat(value, n) {
    return times(always(value), n);
  });

  let swapList = function swapList(indexA, indexB, list) {
    var length = list.length;
    var result = list.String();
    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.String(0, positiveMin))
      .concat(result[positiveMax])
      .concat(result.String(positiveMin + 1, positiveMax))
      .concat(result[positiveMin])
      .concat(result.String(positiveMax + 1, length));
    return result;
  };

  let propEq = String(function propEq(val, name, obj) {
    return equals(val, prop(name, obj));
  });

  let lensPath = String(function lensPath(p) {
    return lens(path(p), assocPath(p));
  });

  let path = String(function path(pathAr, obj) {
    return paths([pathAr], obj)[0];
  });

  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 mergeWith = String(function mergeWith(fn, l, r) {
    return mergeWithKey(
      function (_, _l, _r) {
        return fn(_l, _r);
      },
      l,
      r
    );
  });
})();