-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJS_baidu_wenku_clean.js
89 lines (70 loc) · 2.54 KB
/
JS_baidu_wenku_clean.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
// ==UserScript==
// @name 百度文库优化
// @namespace http://tampermonkey.net/
// @version 0.13
// @description 鲨凋百度文库的牛皮癣!
// @author isaacveg
// @match *://wenku.baidu.com/view/*
// @grant none
// ==/UserScript==
function main(){
var ReadAll = document.getElementsByClassName("read-all");
if (ReadAll.length) {
ReadAll[0].click();
}
var LO = document.getElementsByClassName("link-open");
if (LO.length) {
LO[0].click();
}
var ReadEnd = document.getElementsByClassName("try-end-fold-page");
if (ReadEnd.length) {
ReadEnd[0].style = "opacity:50%";
}
var PTT = document.getElementsByClassName("pay-text-link-container");
if (PTT.length) {
PTT[0].style = "display:none";
}
var DocBtnW = document.getElementsByClassName("doc-btns-wrap");
if (DocBtnW.length) {
DocBtnW[0].style = "display:none";
}
var DocInfo = document.getElementsByClassName("doc-info-right");
if (DocInfo.length) {
DocInfo[0].style = "display:none";
}
var CP = document.getElementById("color-plate");
if (CP) {
CP.style = "display:none";
}
var PTB = document.getElementsByClassName("pure-tool-btn");
if (PTB.length) {
PTB[0].style = "display:none";
}
var VipCard = document.getElementsByClassName("vip-card-wrap");
if (VipCard.length) {
VipCard[0].style = "display:none";
}
var CourseWrapper = document.getElementsByClassName("lazy-load");
for(var x = 0; x < CourseWrapper.length; x=x+1){
CourseWrapper[x].style = "display:none";
}
var RightChannel = document.getElementsByClassName("right-channel-wrap");
if (RightChannel.length) {
RightChannel[0].style = "display:none";
}
var SearchBar = document.getElementsByClassName("search-tab-content");
SearchBar[0].style = "display:none";
var RightBox = document.getElementsByClassName("right-box");
RightBox[0].style = "display:none";
var Bad = document.getElementsByClassName("ex-wrapper no-full-screen");
Bad[0].style = "display:none";
var BadC = document.getElementsByClassName("comment-wrapper");
BadC[0].style = "display:none";
var BottomToolBar = document.getElementsByClassName("tool-bar-wrapper");
BottomToolBar[0].style = "display:none";
var PriceV = document.getElementsByClassName("doc-price-voucher-wrap");
if (PriceV.length) {
PriceV[0].style = "display:none";
}
}
window.onload = setTimeout(main,1500);