-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcontent-script_REMOTE_2848.js
69 lines (56 loc) · 2.36 KB
/
content-script_REMOTE_2848.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
if(document.domain == 'blog.csdn.net'){
var body = document.getElementsByTagName("body")[0]
for(var i=body.children.length-1;i>=0;i--){
if(body.children[i].getAttribute("id") != 'mainBox'){
body.children[i].parentNode.removeChild(body.children[i]);
}
}
var mainBox = document.getElementById("mainBox")
for(var i=mainBox.children.length-1;i>=0;i--){
if(mainBox.children[i].nodeName != 'MAIN'){
mainBox.children[i].parentNode.removeChild(mainBox.children[i]);
}
}
var main = document.getElementsByTagName("main")[0]
for(var i= main.children.length-1; i>=1; i--){
main.children[i].parentNode.removeChild(main.children[i])
}
document.getElementsByTagName('main')[0].style = 'position: absolute;left: 160px;'
}
if(document.domain == 'www.jianshu.com'){
var body = document.getElementsByTagName("body")[0]
for(var i=body.children.length-1;i>=0;i--){
if(!(body.children[i].nodeName == 'DIV' && body.children[i].getAttribute('class') == 'note')){
body.children[i].parentNode.removeChild(body.children[i]);
}
}
var d = body.children[0]
for(var i=d.children.length-1;i>0; i--){
if(d.children[i].getAttribute('class') != 'post' || d.children[i].nodeName == 'A'){
d.children[i].parentNode.removeChild(d.children[i]);
}
}
d.children[0].parentNode.removeChild(d.children[0])
}
if(document.domain == 'www.baidu.com'){
var container = document.getElementById("container")
if(container != null){
for(var i=container.children.length-1; i>=0; i--){
if(container.children[i].getAttribute('id') != 'content_left'){
container.children[i].parentNode.removeChild(container.children[i]);
}
}
document.getElementById("foot").parentNode.removeChild(document.getElementById("foot"))
}
}
if (document.domain == 'juejin.im'){
var page = document.getElementsByClassName('view-container')[0]
page.children[0].setAttribute('hidden', true)
var main = page.children[1]
for (var i = main.children.length - 1; i >= 1; i--) {
main.children[i].setAttribute('hidden', true);
}
var content = main.children[0]
content.children[1].setAttribute('hidden', true)
content.children[0].setAttribute('style', 'position:absolute;left:150px')
}