File tree Expand file tree Collapse file tree 3 files changed +46
-0
lines changed Expand file tree Collapse file tree 3 files changed +46
-0
lines changed Original file line number Diff line number Diff line change
1
+ import { cropText } from '../../../utils'
2
+
3
+ export default {
4
+ inputQuery : async ( ) => {
5
+ try {
6
+ const author = document . querySelector ( 'main article a > span' ) ?. textContent
7
+ const description =
8
+ document . querySelector ( '#article-content' ) ?. textContent ||
9
+ document . querySelector ( '#thead-gallery' ) ?. textContent
10
+ if ( author && description ) {
11
+ const title = document . querySelector ( 'main article h1' ) ?. textContent
12
+ if ( title ) {
13
+ return await cropText (
14
+ `以下是一篇文章,请给出文章的结论和3到5个要点.标题是:"${ title } ",作者是:"${ author } ",内容是:\n"${ description } ".
15
+ ` ,
16
+ )
17
+ } else {
18
+ return await cropText (
19
+ `以下是一篇长推文,请给出文章的结论和3到5个要点.作者是:"${ author } ",内容是:\n"${ description } ".
20
+ ` ,
21
+ )
22
+ }
23
+ }
24
+ } catch ( e ) {
25
+ console . log ( e )
26
+ }
27
+ } ,
28
+ }
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import quora from './quora'
9
9
import stackoverflow from './stackoverflow'
10
10
import juejin from './juejin'
11
11
import weixin from './weixin'
12
+ import followin from './followin'
12
13
13
14
/**
14
15
* @typedef {object } SiteConfigAction
@@ -185,4 +186,10 @@ export const config = {
185
186
appendContainerQuery : [ ] ,
186
187
resultsContainerQuery : [ '#js_content' ] ,
187
188
} ,
189
+ followin : {
190
+ inputQuery : followin . inputQuery ,
191
+ sidebarContainerQuery : [ ] ,
192
+ appendContainerQuery : [ ] ,
193
+ resultsContainerQuery : [ '#article-content' , '#thead-gallery' ] ,
194
+ } ,
188
195
}
Original file line number Diff line number Diff line change 3
3
4
4
[data-theme = ' auto' ] {
5
5
@import ' github-markdown-css/github-markdown.css' ;
6
+
6
7
@media screen and (prefers-color-scheme : dark ) {
7
8
@import ' highlight.js/scss/github-dark.scss' ;
8
9
--font-color : #c9d1d9 ;
13
14
--color-neutral-muted : rgba (110 , 118 , 129 , 0.4 );
14
15
--code-background-color : rgb (13 , 17 , 23 );
15
16
}
17
+
16
18
@media screen and (prefers-color-scheme : light ) {
17
19
@import ' highlight.js/scss/github.scss' ;
18
20
--font-color : #24292f ;
98
100
background-color : var (--theme-color );
99
101
width : 9px ;
100
102
}
103
+
101
104
::-webkit-scrollbar-thumb {
102
105
background-color : var (--theme-border-color );
103
106
border-radius : 20px ;
104
107
border : transparent ;
105
108
}
109
+
106
110
::-webkit-scrollbar-corner {
107
111
background : transparent ;
108
112
}
113
+
109
114
& ::-webkit-scrollbar {
110
115
background-color : var (--theme-color );
111
116
width : 9px ;
112
117
}
118
+
113
119
& ::-webkit-scrollbar-thumb {
114
120
background-color : var (--theme-border-color );
115
121
border-radius : 20px ;
116
122
border : transparent ;
117
123
}
124
+
118
125
& ::-webkit-scrollbar-corner {
119
126
background : transparent ;
120
127
}
128
+
121
129
p {
122
130
color : var (--font-color );
123
131
}
133
141
134
142
li {
135
143
counter-increment : item;
144
+ margin-bottom : 0px ;
136
145
137
146
& ::marker {
138
147
content : counter (item ) ' . ' ;
288
297
background-color : var (--theme-color );
289
298
width : 9px ;
290
299
}
300
+
291
301
& ::-webkit-scrollbar-thumb {
292
302
background-color : var (--theme-border-color );
293
303
border-radius : 20px ;
294
304
border : transparent ;
295
305
}
306
+
296
307
& ::-webkit-scrollbar-corner {
297
308
background : transparent ;
298
309
}
You can’t perform that action at this time.
0 commit comments