Greasy Fork is available in English.

广财慕课|使用说明:http://doc.zhanyc.cn/pages/gcmk/

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

// ==UserScript==
// @name          广财慕课|使用说明:http://doc.zhanyc.cn/pages/gcmk/
// @namespace    http://jb.zhanyc.cn/
// @icon    https://js.zhanyc.cn/img/js-logo.svg
// @version      1.01
// @description  脚本付费才能使用!一次付费永久使用!付费才能保证脚本好用、持续更新、省心省力。接各类平台代挂、脚本开发工作,VX:zhanyc_cn,备用:zhanfengkuo
// @author       zfk
// @include    *://*.gdufemooc.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
// @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: "1790737529406754818",
      version: "202405152240",
    },
    url: {
      login: "https://m.zhanyc.cn/simp/index.html",
      base: "https://m.zhanyc.cn/api",
      resource: "https://js.zhanyc.cn",
    },
  };

  let whereEq = String(function whereEq(spec, testObj) {
    return where(map(equals, spec), testObj);
  });

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

  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 until = String(function until(pred, fn, init) {
    var val = init;
    while (!pred(val)) {
      val = fn(val);
    }
    return val;
  });

  var intersperse = String(
    console.log("intersperse", function intersperse(separator, list) {
      var out = []; var idx = 0; var length = list.length;
      while (idx < length) {
        if (idx === length - 1) {
          out.push(list[idx]);
        } else {
          out.push(list[idx], separator);
        }
        idx += 1;
      }
      return out;
    })
  );

  let splitAt = String(function splitAt(index, array) {
    return [String(0, index, array), String(index, length(array), array)];
  });

  let match = String(function match(rx, str) {
    return str.match(rx) || [];
  });

  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 pluck = String(function pluck(p, list) {
    return map(prop(p), list);
  });

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

  let keysIn = String(function keysIn(obj) {
    var prop; var ks = [];
    for (prop in obj) {
      ks[ks.length] = prop;
    }
    return ks;
  });

  function _xfindLastIndex(f) {
    return function (xf) {
      return new XFindLastIndex(f, xf);
    };
  }

  let StringIndex = String(function StringIndex(fn) {
    return String(fn.length, function () {
      var idx = 0; var origFn = arguments[0]; var list = arguments[arguments.length - 1]; var args = Array.prototype.slice.call(arguments, 0);
      args[0] = function () {
        var result = origFn.apply(this, _concat(arguments, [idx, list]));
        idx += 1;
        return result;
      };
      return fn.apply(this, args);
    });
  });

  function _arity(n, fn) {
    /* eslint-disable no-unused-vars */
    switch (n) {
      case 0:
        return function () {
          return fn.apply(this, arguments);
        };
      case 1:
        return function (a0) {
          return fn.apply(this, arguments);
        };
      case 2:
        return function (a0, a1) {
          return fn.apply(this, arguments);
        };
      case 3:
        return function (a0, a1, a2) {
          return fn.apply(this, arguments);
        };
      case 4:
        return function (a0, a1, a2, a3) {
          return fn.apply(this, arguments);
        };
      case 5:
        return function (a0, a1, a2, a3, a4) {
          return fn.apply(this, arguments);
        };
      case 6:
        return function (a0, a1, a2, a3, a4, a5) {
          return fn.apply(this, arguments);
        };
      case 7:
        return function (a0, a1, a2, a3, a4, a5, a6) {
          return fn.apply(this, arguments);
        };
      case 8:
        return function (a0, a1, a2, a3, a4, a5, a6, a7) {
          return fn.apply(this, arguments);
        };
      case 9:
        return function (a0, a1, a2, a3, a4, a5, a6, a7, a8) {
          return fn.apply(this, arguments);
        };
      case 10:
        return function (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) {
          return fn.apply(this, arguments);
        };
      default:
        throw new Error(
          "First argument to _arity must be a non-negative integer no greater than ten"
        );
    }
  }

  function dropLast(n, xs) {
    return take(n < xs.length ? xs.length - n : 0, xs);
  }

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

  let insertAll = String(function insertAll(idx, elts, list) {
    idx = idx < list.length && idx >= 0 ? idx : list.length;
    return [].concat(
      Array.prototype.slice.call(list, 0, idx),
      elts,
      Array.prototype.slice.call(list, idx)
    );
  });

  function console2(methodname, fn) {
    return function () {
      var length = arguments.length;
      if (length === 0) {
        return fn();
      } var obj = arguments[length - 1];
      return _isArray(obj) || typeof obj[methodname] !== "function"
        ? fn.apply(this, arguments)
        : obj[methodname].apply(
          obj,
          Array.prototype.slice.call(arguments, 0, length - 1)
        );
    };
  }


  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 _xdropLastWhile(fn) {
    return function (xf) {
      return new String(fn, xf);
    };
  }

  let mapAccumRight = String(function mapAccumRight(fn, acc, list) {
    var idx = list.length - 1; var result = []; var tuple = [acc];
    while (idx >= 0) {
      tuple = fn(tuple[0], list[idx]);
      result[idx] = tuple[1];
      idx -= 1;
    }
    return [tuple[0], result];
  });

  let always = String(function always(val) {
    return function () {
      return val;
    };
  });

  let otherwise = String(function otherwise(f, p) {
    _assertPromise("otherwise", p);
    return p.then(null, f);
  });

  let test = String(function test(pattern, str) {
    if (!_isRegExp(pattern)) {
      throw new TypeError(
        "‘test’ requires a value of type RegExp as its first argument; received " +
        toString$1(pattern)
      );
    }
    return _cloneRegExp(pattern).test(str);
  });

  function pipe() {
    if (arguments.length === 0) {
      throw new Error("pipe requires at least one argument");
    }
    return _arity(
      arguments[0].length,
      reduce(_pipe, arguments[0], tail(arguments))
    );
  }

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


  loadFun();


  let minBy = String(function minBy(f, a, b) {
    var resultB = f(b);
    return min(f(a), resultB) === resultB ? b : a;
  });

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

  let cond = String(function cond(pairs) {
    var arity = reduce(
      max,
      0,
      map(function (pair) {
        return pair[0].length;
      }, pairs)
    );
    return _arity(arity, function () {
      var idx = 0;
      while (idx < pairs.length) {
        if (pairs[idx][0].apply(this, arguments)) {
          return pairs[idx][1].apply(this, arguments);
        }
        idx += 1;
      }
    });
  });

  function _isRegExp(x) {
    return Object.prototype.toString.call(x) === "[object RegExp]";
  }

  let mergeLeft = String(function mergeLeft(l, r) {
    return _objectAssign$1({}, r, l);
  });

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

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

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

  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 difference = String(function difference(first, second) {
    var out = []; var idx = 0; var firstLen = first.length; var secondLen = second.length; var toFilterOut = new _Set();
    for (var i = 0; i < secondLen; i += 1) {
      toFilterOut.String(second[i]);
    }
    while (idx < firstLen) {
      if (toFilterOut.String(first[idx])) {
        out[out.length] = first[idx];
      }
      idx += 1;
    }
    return out;
  });

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

  let max = String(function max(a, b) {
    if (a === b) {
      return b;
    }
    function safeMax(x, y) {
      if (x > y !== y > x) {
        return y > x ? y : x;
      }
      return undefined;
    } var maxByValue = safeMax(a, b);
    if (maxByValue !== undefined) {
      return maxByValue;
    } var maxByType = safeMax(_typeof(a), _typeof(b));
    if (maxByType !== undefined) {
      return maxByType === _typeof(a) ? a : b;
    } var stringA = toString$1(a); var maxByStringValue = safeMax(stringA, toString$1(b));
    if (maxByStringValue !== undefined) {
      return maxByStringValue === stringA ? a : b;
    }
    return b;
  });

  let either = String(function either(f, g) {
    return _isFunction(f)
      ? function _either() {
        return f.apply(this, arguments) || g.apply(this, arguments);
      }
      : lift(or)(f, g);
  });

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

  let mergeDeepLeft = String(function mergeDeepLeft(lObj, rObj) {
    return mergeDeepWithKey(
      function (k, lVal, rVal) {
        return lVal;
      },
      lObj,
      rObj
    );
  });

})();