wekan.tv - remove WeChat QR code

Remove WeChat QR code in wekan.tv

目前为 2020-04-14 提交的版本。查看 最新版本

// ==UserScript==
// @name        wekan.tv - remove WeChat QR code
// @namespace   Violentmonkey Scripts
// @description Remove WeChat QR code in wekan.tv
// @match       *://www.wekan.tv/*
// @version     0.1
// @author      Bin
// ==/UserScript==

/* jshint esversion: 6 */

function openBypass(original_function) {

    return function(method, url) {

        this.addEventListener("readystatechange", (response) => {
            if (this.readyState !== 4 || method !== 'GET' || !/wxSubscribe/.test(url)) {
                return;
            }

            try{
                Object.defineProperty(this, 'responseText', { writable: true });
                const res = JSON.parse(response.target.response);
                res.data.code = 0;
                this.responseText = JSON.stringify(res);
            } catch(e) {}
        });

        return original_function.apply(this, arguments);
    };

}

XMLHttpRequest.prototype.open = openBypass(XMLHttpRequest.prototype.open);

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址