File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed
src/content-script/site-adapters Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -145,9 +145,9 @@ export const config = {
145
145
} ,
146
146
gitlab : {
147
147
inputQuery : gitlab . inputQuery ,
148
- sidebarContainerQuery : [ '.js-commit-box-info' ] ,
148
+ sidebarContainerQuery : [ '.info-well' , '. js-commit-box-info'] ,
149
149
appendContainerQuery : [ ] ,
150
- resultsContainerQuery : [ '.js-commit-box-info' ] ,
150
+ resultsContainerQuery : [ '.info-well' , '. js-commit-box-info'] ,
151
151
} ,
152
152
zhihu : {
153
153
inputQuery : zhihu . inputQuery ,
@@ -157,9 +157,9 @@ export const config = {
157
157
} ,
158
158
reddit : {
159
159
inputQuery : reddit . inputQuery ,
160
- sidebarContainerQuery : [ '.side div:nth-child(2) ' ] ,
160
+ sidebarContainerQuery : [ '#pdp-right-rail-topics div' ] ,
161
161
appendContainerQuery : [ ] ,
162
- resultsContainerQuery : [ '.side div:nth-child(2) ' ] ,
162
+ resultsContainerQuery : [ '#pdp-right-rail-topics div' ] ,
163
163
} ,
164
164
quora : {
165
165
inputQuery : quora . inputQuery ,
Original file line number Diff line number Diff line change @@ -3,15 +3,15 @@ import { cropText } from '../../../utils'
3
3
export default {
4
4
inputQuery : async ( ) => {
5
5
try {
6
- const title = document . querySelector ( '.entry .title' ) . textContent
7
- const texts = document . querySelectorAll ( '.entry .usertext-body' )
8
- let description
9
- if ( texts . length > 0 ) description = texts [ 0 ] . textContent
6
+ const title = document . querySelector ( '.main shreddit-post div:nth-child(4)' ) . textContent
7
+ const description = document . querySelector (
8
+ '.main shreddit-post div:nth-child(6) div' ,
9
+ ) . textContent
10
+ const texts = document . querySelectorAll ( 'shreddit-comment div:nth-child(2)' )
10
11
let answers = ''
11
- if ( texts . length > 1 )
12
- for ( let i = 1 ; i < texts . length ; i ++ ) {
13
- answers += `answer${ i } :${ texts [ i ] . textContent } |`
14
- }
12
+ for ( let i = 0 ; i < texts . length ; i ++ ) {
13
+ answers += `answer${ i } :${ texts [ i ] . textContent } |`
14
+ }
15
15
16
16
return cropText (
17
17
`Below is the content from a social forum,giving the corresponding summary and your opinion on it.` +
You can’t perform that action at this time.
0 commit comments