@@ -60,13 +60,11 @@ window.$docsify = {
60
60
category : 'Announcements' ,
61
61
categoryId : 'DIC_kwDOCOGUlc4CZmhe' ,
62
62
mapping : 'specific' ,
63
- term : getTerm ( ) ,
64
63
reactionsEnabled : '0' ,
65
64
strict : '1' ,
66
65
emitMetadata : '0' ,
67
66
inputPosition : 'top' ,
68
67
crossorigin : 'anonymous' ,
69
- lang : getLang ( ) ,
70
68
} ,
71
69
contributors : {
72
70
repo : 'doocs/leetcode' ,
@@ -143,9 +141,6 @@ window.$docsify = {
143
141
return html + footer ;
144
142
} ) ;
145
143
hook . doneEach ( ( ) => {
146
- const term = getTerm ( ) ;
147
- const lang = getLang ( ) ;
148
-
149
144
const giscusScript = document . createElement ( 'script' ) ;
150
145
const {
151
146
repo,
@@ -174,18 +169,17 @@ window.$docsify = {
174
169
giscusScript . setAttribute ( 'crossorigin' , crossorigin ) ;
175
170
giscusScript . setAttribute ( 'data-theme' , giscusTheme ( ) ) ;
176
171
177
- giscusScript . setAttribute ( 'data-term' , term ) ;
178
- giscusScript . setAttribute ( 'data-lang' , lang ) ;
172
+ giscusScript . setAttribute ( 'data-term' , getTerm ( ) ) ;
173
+ giscusScript . setAttribute ( 'data-lang' , getLang ( ) ) ;
179
174
180
175
document
181
176
. getElementById ( 'main' )
182
177
. insertBefore ( giscusScript , document . getElementById ( 'main' ) . lastChild ) ;
183
178
184
179
document . getElementById ( 'docsify-darklight-theme' ) . addEventListener ( 'click' , ( ) => {
185
180
const frame = document . querySelector ( '.giscus-frame' ) ;
186
- const theme = giscusTheme ( ) ;
187
181
frame . contentWindow . postMessage (
188
- { giscus : { setConfig : { theme } } } ,
182
+ { giscus : { setConfig : { theme : giscusTheme ( ) } } } ,
189
183
'https://giscus.app' ,
190
184
) ;
191
185
} ) ;
0 commit comments