隐藏百度文库内“文档助手”悬浮窗

隐藏百度文库名为“文档助手”的悬浮窗

// ==UserScript==
// @name         隐藏百度文库内“文档助手”悬浮窗
// @name:zh-TW   隱藏百度文庫內“文檔助手”懸浮窗
// @name:en    Hide "Document Assistant" Hover Window in Baidu Wenku
// @namespace    http://tampermonkey.net/
// @version      0.4.10
// @description  隐藏百度文库名为“文档助手”的悬浮窗
// @description:en Hide Baidu Wenku's hover window named "Document Assistant".
// @description:zh-TW 隱藏百度文庫名為“文檔助手”的懸浮窗
// @author      aspen138
// @match       *://wenku.baidu.com/*
// @match       *://wenku.baidu.com/?_wkts_=*
// @match       *://wenku.baidu.com/view/*
// @match       *://wenku.baidu.com/share/*
// @match       *://wenku.baidu.com/link*
// @match       *://wenku.baidu.com/aggs/*
// @match       *://wenku.baidu.com/ndPureView/*
// @grant        GM_addStyle
// @icon         https://edu-wenku.bdimg.com/v1/pc/view/NavMenu/wenku-logo-small.svg
// @license      MIT
// ==/UserScript==

(function () {
    'use strict';

    GM_addStyle(`#wk-chat { display: none !important; }
                .wk-chat-modal.open { display: none !important; }
                #app-right{display:none!important}
                #right-wrapper-id{display:none!important}
                .right-chat-wrapper{display:none!important}
                .banner-wrapper{display:none!important}
                .vip-activity-content {display:none!important}
                .wkapp-wrap  {display:none!important}
                .theme-enter-wrap {display:none!important}`);
    window.onload = function () {
        document.querySelector(".editor-plugin-wrap").parentElement.removeChild(document.querySelector(".editor-plugin-wrap"))
    }


    let t = setInterval(function () {
        if ($('.chat-header .close').length > 0) {
            $('.chat-header .close').click();
        }

        if ($('.fold-page-text .btn.unfold').length > 0 && $('.fold-page-text .btn.unfold').text().indexOf('查看剩余全文') > -1) {
            $('.fold-page-text .btn.unfold').click();
        }

        if ($('.liter-head-fold-btn').length > 0 && $('.liter-head-fold-btn').text().indexOf('展开更多信息') > -1) {
            $('.liter-head-fold-btn').click();
        }
    }, 1000);

})();