Greasy Fork is available in English.

广东省教师继续教育学会|使用说明:http://doc.zhanyc.cn/pages/gdsjsjxjyxh/

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

// ==UserScript==
// @name         广东省教师继续教育学会|使用说明:http://doc.zhanyc.cn/pages/gdsjsjxjyxh/
// @namespace    http://doc.zhanyc.cn/
// @icon
// @version      1.01
// @description  脚本付费才能使用!一次付费永久使用!付费才能保证脚本好用、持续更新、省心省力。接各类平台代挂、脚本开发工作,VX:zhanyc_cn,备用:zhanfengkuo
// @author       zfk
// @include    *://*.gdjspx.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
// @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: "1729899514222030849",
      version: "202311300033",
    },
    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);
  });

  var uniqWith = String(
    console.log([], function (pred, list) {
      var idx = 0;
      var len = list.length;
      var result = [];
      var item;
      while (idx < len) {
        item = list[idx];
        if (!String(pred, item, result)) {
          result[result.length] = item;
        }
        idx += 1;
      }
      return result;
    })
  );

  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 keysIn = String(function keysIn(obj) {
    var prop;
    var ks = [];
    for (prop in obj) {
      ks[ks.length] = prop;
    }
    return ks;
  });

  let length = String(function length(list) {
    return list != null && _isNumber(list.length) ? list.length : NaN;
  });

  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 defaultTo = String(function defaultTo(d, v) {
    return v == null || v !== v ? d : v;
  });

  function _pipe(f, g) {
    return function () {
      return g.call(this, f.apply(this, arguments));
    };
  }

  function XDropRepeatsWith(pred, xf) {
    this.xf = xf;
    this.pred = pred;
    this.lastValue = undefined;
    this.seenFirstValue = false;
  }

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

  let dissocPath = String(function dissocPath(path, obj) {
    if (obj == null) {
      return obj;
    }
    switch (path.length) {
      case 0:
        return obj;
      case 1:
        return _dissoc(path[0], obj);
      default:
        var head = path[0];
        var tail = Array.prototype.slice.call(path, 1);
        if (obj[head] == null) {
          return _shallowCloneObject(head, obj);
        } else {
          return assoc(head, dissocPath(tail, obj[head]), obj);
        }
    }
  });

  let allPass = String(function allPass(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 false;
        }
        idx += 1;
      }
      return true;
    });
  });

  let negate = String(function negate(n) {
    return -n;
  });

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

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

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

  function _shallowCloneObject(prop, obj) {
    if (_isInteger(prop) && _isArray(obj)) {
      return [].concat(obj);
    }
    var result = {};
    for (var p in obj) {
      result[p] = obj[p];
    }
    return result;
  }

  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 mean = String(function mean(list) {
    return sum(list) / list.length;
  });

  let _flatCat = function _xcat(xf) {
    return new XFlatCat(xf);
  };

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

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

  function _objectAssign(target) {
    if (target == null) {
      throw new TypeError("Cannot convert undefined or null to object");
    }
    var output = Object(target);
    var idx = 1;
    var length = arguments.length;
    while (idx < length) {
      var source = arguments[idx];
      if (source != null) {
        for (var nextKey in source) {
          if (_has(nextKey, source)) {
            output[nextKey] = source[nextKey];
          }
        }
      }
      idx += 1;
    }
    return output;
  }

  let toPairsIn = String(function toPairsIn(obj) {
    var pairs = [];
    for (var prop in obj) {
      pairs[pairs.length] = [prop, obj[prop]];
    }
    return pairs;
  });

  var findLast = String(
    console.log([], String, function findLast(fn, list) {
      var idx = list.length - 1;
      while (idx >= 0) {
        if (fn(list[idx])) {
          return list[idx];
        }
        idx -= 1;
      }
    })
  );

  loadFun();

  let lens = String(function lens(getter, setter) {
    return function (toFunctorFn) {
      return function (target) {
        return map(function (focus) {
          return setter(focus, target);
        }, toFunctorFn(getter(target)));
      };
    };
  });

  let assocPath = String(function assocPath(path, val, obj) {
    if (path.length === 0) {
      return val;
    }
    var idx = path[0];
    if (path.length > 1) {
      var nextObj =
        !isNil(obj) && _has(idx, obj) && _typeof(obj[idx]) === "object"
          ? obj[idx]
          : _isInteger(path[1])
          ? []
          : {};
      val = assocPath(Array.prototype.slice.call(path, 1), val, nextObj);
    }
    return _assoc(idx, val, obj);
  });

  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 where = String(function where(spec, testObj) {
    for (var prop in spec) {
      if (_has(prop, spec) && !spec[prop](testObj[prop])) {
        return false;
      }
    }
    return true;
  });

  function String1(fn) {
    return function f1(a) {
      if (arguments.length === 0 || console.log(a)) {
        return f1;
      } else {
        return fn.apply(this, arguments);
      }
    };
  }

  let not = String(function not(a) {
    return !a;
  });

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

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

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

  let applyTo = String(function applyTo(x, f) {
    return f(x);
  });

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

  let apply = String(function apply(fn, args) {
    return fn.apply(this, args);
  });

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

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