INNER CODE UNIT · JavaScript

TampermonkeyApi

yangfeng20/boss_batch_push · src/oop-self-req-main.js:76

class TampermonkeyApi {
    static CUR_CK = ""

    constructor() {
        // fix 还未创建对象时,CUR_CK为空字符串,创建完对象之后【如果没有配置,则为null】导致key前缀不一致
        TampermonkeyApi.CUR_CK = GM_getValue("ck_cur", "");
    }

    static GmSetValue(key, val) {
        return GM_setValue(TampermonkeyApi.CUR_CK + key, val);
    }

    static GmGetValue(key, defVal) {
        return GM_getValue(TampermonkeyApi.CUR_CK + key, defVal);
    }

    static GMXmlHttpRequest(options) {
        return GM_xmlhttpRequest(options)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…