-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhosts.js
54 lines (53 loc) · 1.31 KB
/
hosts.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
ae_hosts = {
"names": [
"ncbi.nlm.nih.gov",
"plos",
"cell.com",
"peerj.com",
"elifesciences",
"arxiv.org"
],
"plos": ["title = document.getElementsByTagName('h1')[0];"],
"ncbi.nlm.nih.gov": [
"var h1 = document.getElementsByTagName('h1');",
"for(var i=0; i<h1.length; i++){",
"if(h1[i].className == \"content-title\"){",
"console.log(h1[i]);",
"title = h1[i];",
"}",
"}",
"if ( title == null )",
"title = h1[1];"
],
"cell.com": [
"title = document.getElementById('top_title');",
"if(!title){",
"title = document.getElementById('article_title');",
"}"
],
"peerj.com": [
"var h1 = document.getElementsByTagName('h1');",
"for(var i=0; i<h1.length; i++){",
"if(h1[i].className == \"article-title\"){",
"title = h1[i];",
"}",
"}"
],
"elifesciences": [
"var h1 = document.getElementsByTagName('h1');",
"for(var i=0; i<h1.length; i++){",
"if(h1[i].className == \"page-title\"){",
"console.log(h1[i]);",
"title = h1[i];",
"}",
"}"
],
"arxiv.org": [
"var h1 = document.getElementsByTagName('h1');",
"for(var i=0; i<h1.length; i++){",
"if(h1[i].className == \"title\"){",
"title = h1[i];",
"}",
"}"
]
};