@@ -60,13 +60,11 @@ window.$docsify = {
6060 category : 'Announcements' ,
6161 categoryId : 'DIC_kwDOCOGUlc4CZmhe' ,
6262 mapping : 'specific' ,
63- term : getTerm ( ) ,
6463 reactionsEnabled : '0' ,
6564 strict : '1' ,
6665 emitMetadata : '0' ,
6766 inputPosition : 'top' ,
6867 crossorigin : 'anonymous' ,
69- lang : getLang ( ) ,
7068 } ,
7169 contributors : {
7270 repo : 'doocs/leetcode' ,
@@ -143,9 +141,6 @@ window.$docsify = {
143141 return html + footer ;
144142 } ) ;
145143 hook . doneEach ( ( ) => {
146- const term = getTerm ( ) ;
147- const lang = getLang ( ) ;
148- 149144 const giscusScript = document . createElement ( 'script' ) ;
150145 const {
151146 repo,
@@ -174,18 +169,17 @@ window.$docsify = {
174169 giscusScript . setAttribute ( 'crossorigin' , crossorigin ) ;
175170 giscusScript . setAttribute ( 'data-theme' , giscusTheme ( ) ) ;
176171
177- giscusScript . setAttribute ( 'data-term' , term ) ;
178- giscusScript . setAttribute ( 'data-lang' , lang ) ;
172+ giscusScript . setAttribute ( 'data-term' , getTerm ( ) ) ;
173+ giscusScript . setAttribute ( 'data-lang' , getLang ( ) ) ;
179174
180175 document
181176 . getElementById ( 'main' )
182177 . insertBefore ( giscusScript , document . getElementById ( 'main' ) . lastChild ) ;
183178
184179 document . getElementById ( 'docsify-darklight-theme' ) . addEventListener ( 'click' , ( ) => {
185180 const frame = document . querySelector ( '.giscus-frame' ) ;
186- const theme = giscusTheme ( ) ;
187181 frame . contentWindow . postMessage (
188- { giscus : { setConfig : { theme } } } ,
182+ { giscus : { setConfig : { theme : giscusTheme ( ) } } } ,
189183 'https://giscus.app' ,
190184 ) ;
191185 } ) ;
0 commit comments