-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsurfingkyes_settings
193 lines (181 loc) · 4.42 KB
/
surfingkyes_settings
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
const {
aceVimMap,
mapkey,
imap,
imapkey,
getClickableElements,
vmapkey,
map,
unmap,
cmap,
addSearchAlias,
removeSearchAlias,
tabOpenLink,
readText,
Clipboard,
Front,
Hints,
Visual,
RUNTIME
} = api;
settings.focusFirstCandidate = true;
settings.modeAfterYank = 'Normal';
mapkey('gF', '#12Open Chrome Flags', () => { tabOpenLink("https://chatgpt.com/"); });
// scroll half page up
map('s', 'e');
// close all tabs except current one
map('ca', 'gxx');
// close tabs on right side
map('cr', 'gx$');
// close tabs on leftside
map('cl', 'gx0');
// Go to the last tab
map('<Ctrl-0>','g$');
// Go to previous visited tab
map('gp', '<Ctrl-6>');
unmap('O');
map('ss', 'oo');
unmap('oo');
unmap('gc')
map('<SPACE>', 'ChatGPT', function() {
tabOpenLink("https://www.google.com/");
});
addSearchAlias('j', 'JD', 'https://search.jd.com/Search?keyword=');
addSearchAlias('d', 'douban', 'https://www.douban.com/search?cat=1001&q=');
addSearchAlias('b', 'bilibili', 'https://search.bilibili.com/all?keyword=');
addSearchAlias('r', 'Reddit', 'https://www.reddit.com/search/?q=');
addSearchAlias('z', '知乎', 'https://www.zhihu.com/search?type=content&q=','s',
'https://www.zhihu.com/api/v4/search/suggest?q=',
(res)=>{
res=JSON.parse(res.text)
return res.suggest.map(x=>x.query);
}
);
addSearchAlias('g', 'github搜索', 'https://github.com/search?q=','s',
'https://api.github.com/search/repositories?q=',
(res)=>{
console.log(res)
res=JSON.parse(res.text)
res=res.items.map(x=>({html:`
<div>
<span style="color:#d79921;margin-bottom:10px;">★ ${x.stargazers_count}</span>
<span style="font-size:15px;font-weight:bold;">${x.name}</span>
<span style="color:#98971a">${x.description}</span>
</div>`
,props:{url:x.html_url} }))
return res;
}
);
addSearchAlias('o', '谷歌搜索', 'https://www.google.com/search?q=','s',
'https://www.google.com/complete/search?client=chrome-omni&gs_ri=chrome-ext&oit=1&cp=1&pgcl=7&q=',
(res)=>JSON.parse(res.text)[1]
);
addSearchAlias(
'tb',
'taobao',
'https://s.taobao.com/search?q=',
's',
'https://suggest.taobao.com/sug?code=utf-9&q=',
(response)=> {
var res = []
console.log(response)
try {
res = JSON.parse(response.text).result.map(function (it) {
return it[-1]
})
} catch (e) {}
console.log(res)
res=res.map(x=>`<span style="color:red;">${x}</span>`)
return res
},
'o'
);
/*
addSearchAlias(
'w',
'微信小程序',
'https://developers.weixin.qq.com/doc/search.html?source=enter&doc_type=miniprogram&jumpbackUrl=%1Fdoc%2F&query=',
's',
'https://developers.weixin.qq.com/search?action=wxa_search&size=9&page=1&language=1&type=wxadoc&doc_type=miniprogram&query=',
(response)=> {
let res = []
let obj = JSON.parse(response.text)
res=obj.doc_item_list.item_list.map(x=>({html:`<div><span style="font-size:15px;font-weight:bold;">${x.title}</span> <span style="color:#666666">${x.content}</span></div>`,props:{url:x.url} }))
return res
},
'o'
);
*/
/* set theme */
settings.theme = `
.sk_theme {
font-family: Input Sans Condensed, Charcoal, sans-serif;
font-size: 10pt;
background: #282828;
color: #ebdbb2;
}
.sk_theme tbody {
color: #b8bb26;
}
.sk_theme .url {
color: #98971a;
}
.sk_theme li {
padding: 5px 10px;
}
.sk_theme ul {
margin: 0px 0px;
}
.sk_theme .annotation {
color: #b16286;
}
.sk_theme .omnibar_highlight {
color: #fe8019;
}
.sk_theme .omnibar_folder {
color: #458588;
}
.sk_theme .omnibar_timestamp {
color: #b16286;
}
.sk_theme #sk_omnibarSearchArea {
background: #282828;
margin: 0 0;
border-bottom: 1px solid #3c3836;
}
.sk_theme #sk_omnibarSearchArea>input {
padding: 0px 0px 0px 15px;
color: #fe8019
}
.sk_theme #sk_omnibarSearchArea .prompt {
background: #d65d0e;
padding: 12px 17px;
border-bottom: 0px solid #3c3836;
color: #ebdbb2
}
#sk_omnibar {
border-radius: 6px;
}
.sk_theme .separator {
padding: 0 0 0 5px;
color: #ebdbb2
}
.sk_theme .resultPage {
color: #504945;
padding: 12px 17px;
}
.sk_theme #sk_omnibarSearchResult ul li:nth-child(odd) {
background: #282828;
}
.sk_theme #sk_omnibarSearchResult {
margin: 0 0;
}
.sk_theme #sk_omnibarSearchResult ul li {
padding: 10px 15px;
}
.sk_theme #sk_omnibarSearchResult ul li.focused {
background: #3c3836;
}
#sk_status, #sk_find {
font-size: 20pt;
}`;