-
Notifications
You must be signed in to change notification settings - Fork 26
/
github.js
72 lines (72 loc) · 2.16 KB
/
github.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
{
search:[
{
query:'https://github.com/search?q={{term}}',
type:'project',
translate:'parseHTML(response)',
name:{
selector:'.repo-list-name a',
expression:'$(element).text()'
},
link:{
selector:'.repo-list-name a',
expression:'"https://github.com" + $(element).attr("href")'
},
description:{
selector:'.repo-list-description',
expression:'$(element).text()'
}
},
{
query:'https://github.com/search?q={{term}}&type=Code',
type:'file',
translate:'parseHTML(response)',
name:{
selector:'.code-list-item p',
expression:'$(element).text()'
},
link:{
selector:'.code-list-item .file-box .blob-num a',
expression:'"https://github.com" + $(element).attr("href")'
}
},
{
query:'https://github.com/search?q={{term}}&type=Issues',
type:'task',
translate:'parseHTML(response)',
name:{
selector:'.issue-list-item .title a',
expression:'$(element).text()'
},
link:{
selector:'.issue-list-item .title a',
expression:'"https://github.com" + $(element).attr("href")'
},
description:{
selector:'.issue-list-item .description',
expression:'$(element).text()'
}
},
{
query:'https://github.com/search?q={{term}}&type=Users',
type:'contact',
translate:'parseHTML(response)',
name:{
selector:'.user-list-item .user-list-info > a',
expression:'$(element).text()'
},
image:{
selector : '.user-list-item .avatar',
expression : '$(element).attr("src")'
},
link:{
selector:'.user-list-item .user-list-info > a',
expression:'"https://github.com" + $(element).attr("href")'
},
description:{
selector:'.user-list-item .user-list-info em',
expression:'$(element).text()'
}
}
]
}