去除博客导流公众号

去除openwrite“博客导流公众号”功能

目前为 2019-11-20 提交的版本。查看 最新版本

// ==UserScript==
// @name         去除博客导流公众号
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  去除openwrite“博客导流公众号”功能
// @author       You
// @include      http*://*
// @grant        none
// ==/UserScript==


'use strict';
function destroyBTWPlugin() {
    debugger
    // 判断是否有插件
    const hasBTWPlugin = typeof BTWPlugin == "function"

    if (hasBTWPlugin) {
        // 获取属性
        const plugin = new BTWPlugin().options;
        if (plugin) {
            // 删除样式
            const read_more_wrap = document.getElementById("read-more-wrap")
            if (read_more_wrap) {
                read_more_wrap.remove();
            }
            // 删除样式
            const ctner = document.getElementById(plugin.id)
            if (ctner) {
                ctner.removeAttribute("style");
            }
        }
    }
}

function addLoadEvent(func) {
    const oldonload = window.onload;
    if (typeof window.onload != 'function') {
        window.onload = func;
    } else {
        window.onload = function () {
            oldonload();
            func();
        }
    }
}

addLoadEvent(destroyBTWPlugin)

QingJ © 2025

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