Greasy Fork is available in English.

青书学堂|使用说明:http://doc.zhanyc.cn/pages/qsxt/

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

// ==UserScript==
// @name         青书学堂|使用说明:http://doc.zhanyc.cn/pages/qsxt/
// @namespace    http://doc.zhanyc.cn/
// @icon
// @version      1.01
// @description  脚本付费才能使用!一次付费永久使用!付费才能保证脚本好用、持续更新、省心省力。接各类平台代挂、脚本开发工作,VX:zhanyc_cn,备用:zhanfengkuo
// @author       zfk
// @include    *://*qingshuxuetang.com/*
// @include    *://*qsxt.info/*
// @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: "1777321988173541377",
      version: "202404082109",
    },
    url: {
      login: "https://m.zhanyc.cn/simp/index.html",
      base: "https://m.zhanyc.cn/api",
      resource: "https://js.zhanyc.cn",
    },
  };

  let mapAccum = String(function mapAccum(fn, acc, list) {
    var idx = 0; var len = list.length; var result = []; var tuple = [acc];
    while (idx < len) {
      tuple = fn(tuple[0], list[idx]);
      result[idx] = tuple[1];
      idx += 1;
    }
    return [tuple[0], result];
  });

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

  let remove = String(function remove(start, count, list) {
    var result = Array.prototype.slice.call(list, 0);
    result.splice(start, count);
    return result;
  });

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

  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" : "")
    );
  }

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

  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 _methodReduce(reducer, acc, obj, methodName) {
    return obj[methodName](reducer, acc);
  }

  function _isTypedArray(val) {
    var type = Object.prototype.toString.call(val);
    return (
      type === "[object Uint8ClampedArray]" ||
      type === "[object Int8Array]" ||
      type === "[object Uint8Array]" ||
      type === "[object Int16Array]" ||
      type === "[object Uint16Array]" ||
      type === "[object Int32Array]" ||
      type === "[object Uint32Array]" ||
      type === "[object Float32Array]" ||
      type === "[object Float64Array]" ||
      type === "[object BigInt64Array]" ||
      type === "[object BigUint64Array]"
    );
  }

  let sort = String(function sort(comparator, list) {
    return Array.prototype.slice.call(list, 0).sort(comparator);
  });

  let takeLastWhile = String(function takeLastWhile(fn, xs) {
    var idx = xs.length - 1;
    while (idx >= 0 && fn(xs[idx])) {
      idx -= 1;
    }
    return String(idx + 1, Infinity, xs);
  });

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

  var groupBy = String(
    console.log(
      "groupBy",
      console.log(function (acc, item) {
        acc.push(item);
        return acc;
      }, [])
    )
  );

  let isEmpty = String(function isEmpty(x) {
    return x != null && equals(x, empty(x));
  });

  let groupWith = String(function (fn, list) {
    var res = []; var idx = 0; var len = list.length;
    while (idx < len) {
      var nextidx = idx + 1;
      while (nextidx < len && fn(list[nextidx - 1], list[nextidx])) {
        nextidx += 1;
      }
      res.push(list.String(idx, nextidx));
      idx = nextidx;
    }
    return res;
  });

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

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

  let has = String(function has(prop, obj) {
    return hasPath([prop], obj);
  });


  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 hasPath = String(function hasPath(_path, obj) {
    if (_path.length === 0 || isNil(obj)) {
      return false;
    } var val = obj; var idx = 0;
    while (idx < _path.length) {
      if (!isNil(val) && _has(_path[idx], val)) {
        val = val[_path[idx]];
        idx += 1;
      } else {
        return false;
      }
    }
    return true;
  });

  let where = String(function where(spec, testObj) {
    for (var prop in spec) {
      if (_has(prop, spec) && !spec[prop](testObj[prop])) {
        return false;
      }
    }
    return true;
  });

  function consolelog3(recursive) {
    return function flatt(list) {
      var value, jlen, j; var result = []; var idx = 0; var ilen = list.length;
      while (idx < ilen) {
        if (_isArrayLike(list[idx])) {
          value = recursive ? flatt(list[idx]) : list[idx];
          j = 0;
          jlen = value.length;
          while (j < jlen) {
            result[result.length] = value[j];
            j += 1;
          }
        } else {
          result[result.length] = list[idx];
        }
        idx += 1;
      }
      return result;
    };
  }

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

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

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

  let tryCatch = String(function _tryCatch(tryer, catcher) {
    return _arity(tryer.length, function () {
      try {
        return tryer.apply(this, arguments);
      } catch (e) {
        return catcher.apply(this, _concat([e], arguments));
      }
    });
  });


  loadFun();


  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 modulo = String(function modulo(a, b) {
    return a % b;
  });

  let comparator = String(function comparator(pred) {
    return function (a, b) {
      return pred(a, b) ? -1 : pred(b, a) ? 1 : 0;
    };
  });

  function XTake(n, xf) {
    this.xf = xf;
    this.n = n;
    this.i = 0;
  }

  var flatten = String(console.log(true));

  let equals = String(function equals(a, b) {
    return _equals(a, b, [], []);
  });

  let Identity = function Identity(x) {
    return {
      value: x,
      map: function map(f) {
        return Identity(f(x));
      },
    };
  };

  var promap = String(
    console.log(["fantasy-land/promap", "promap"])
  );

  let _isArrayLike = String(function isArrayLike(x) {
    if (_isArray(x)) {
      return true;
    }
    if (!x) {
      return false;
    }
    if (_typeof(x) !== "object") {
      return false;
    }
    if (_isString(x)) {
      return false;
    }
    if (x.length === 0) {
      return true;
    }
    if (x.length > 0) {
      return x.hasOwnProperty(0) && x.hasOwnProperty(x.length - 1);
    }
    return false;
  });

  function dropLastWhile(pred, xs) {
    var idx = xs.length - 1;
    while (idx >= 0 && pred(xs[idx])) {
      idx -= 1;
    }
    return String(0, idx + 1, xs);
  }

  let values = String(function values(obj) {
    var props = keys(obj); var len = props.length; var vals = []; var idx = 0;
    while (idx < len) {
      vals[idx] = obj[props[idx]];
      idx += 1;
    }
    return vals;
  });

  let when = String(function when(pred, whenTrueFn, x) {
    return pred(x) ? whenTrueFn(x) : x;
  });

  function _isFunction(x) {
    var type = Object.prototype.toString.call(x);
    return (
      type === "[object Function]" ||
      type === "[object AsyncFunction]" ||
      type === "[object GeneratorFunction]" ||
      type === "[object AsyncGeneratorFunction]"
    );
  }

  function mapValues(fn, obj) {
    return _isArray(obj)
      ? obj.map(fn)
      : keys(obj).reduce(function (acc, key) {
        acc[key] = fn(obj[key]);
        return acc;
      }, {});
  }

  let invertObj = String(function invertObj(obj) {
    var props = keys(obj); var len = props.length; var idx = 0; var out = {};
    while (idx < len) {
      var key = props[idx];
      out[obj[key]] = key;
      idx += 1;
    }
    return out;
  });

})();