Greasy Fork is available in English.

百度文库还原纯白背景与净化

去除强制花里胡哨的背景与部分多余元素,恢复默认纯白背景,并未全部去除,可用adblockplus去除的不作处理

// ==UserScript==
// @name         百度文库还原纯白背景与净化
// @author       Black Rabbit
// @namespace    Black Rabbit
// @version      0.2
// @description  去除强制花里胡哨的背景与部分多余元素,恢复默认纯白背景,并未全部去除,可用adblockplus去除的不作处理
// @match        *://wenku.baidu.com/*
// @match        *://wk.baidu.com/*
// @run-at       document-start
// @icon         https://www.baidu.com/favicon.ico
// @grant        none
// ==/UserScript==

// Wipe the bg
function wipebg() {
    'use strict';
    while(!document.getElementById('app')){
    }
    var app = document.getElementById('app');
    if(app.style!=''){
        app.style = '';
    }
}

function wipevmpc() {
    'use strict';
    var vmpc = document.getElementsByClassName('vip-member-pop-content');
    var cmw = document.getElementsByClassName('comment-wrapper');
    var fwi = document.getElementById('footer-wrapper-id');
    var sw = document.getElementsByClassName('sidebar-wrapper');
    vmpc[0].remove();
    cmw[0].remove();
    fwi.remove();
    var swc = sw[0].children;
    for(var i=0;i<swc.length+5;i++){
        swc[0].remove();
    }
}

setTimeout(wipebg,200);
setInterval(wipevmpc,400);
setTimeout(clearInterval(wipevmpc),4000);