// ==UserScript== // @name 去除博客导流公众号 // @namespace http://tampermonkey.net/ // @version 0.1 // @description 去除openwrite“博客导流公众号”功能 // @author You // @include http*://* // @grant none // @downloadURL 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)