File tree 2 files changed +11
-0
lines changed
2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 1
1
import { getLogseqCopliotConfig } from '@/config' ;
2
+ import { fixDuckDuckGoDark } from '@/utils' ;
2
3
import { createRoot } from 'react-dom/client' ;
3
4
import Browser from 'webextension-polyfill' ;
4
5
import { LogseqCopliot } from './LogseqCopliot' ;
@@ -27,6 +28,10 @@ async function run(
27
28
) {
28
29
console . debug ( 'Logseq copliot' , window . location . hostname ) ;
29
30
31
+ if ( searchEngine instanceof DuckDuckGo ) {
32
+ fixDuckDuckGoDark ( )
33
+ }
34
+
30
35
const query = searchEngine . getQuery ( ) ;
31
36
if ( query ) {
32
37
console . log ( `match ${ typeof searchEngine } , query ${ query } ` ) ;
Original file line number Diff line number Diff line change @@ -83,3 +83,9 @@ export const buildTurndownService = () => {
83
83
84
84
return turndownService ;
85
85
} ;
86
+
87
+ export const fixDuckDuckGoDark = ( ) => {
88
+ if ( document . querySelector ( '.dark-bg' ) ) {
89
+ document . body . style . color = 'var(--theme-col-txt-snippet)' ;
90
+ }
91
+ }
You can’t perform that action at this time.
0 commit comments