File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
src/resources/formats/html Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 1313 <%- giscus.loading ? `data-loading =${giscus.loading} ` : ' ' % >
1414 async >
1515 </script >
16+ <script type =" application/javascript" >
17+ window .document .addEventListener (" DOMContentLoaded" , function (event ) {
18+ var giscusIframe = window .document .querySelector (' iframe.giscus-frame' );
19+ giscusIframe .addEventListener (" load" , function () {
20+ window .setTimeout (() => {
21+ window .toggleGiscusIfUsed (window .hasAlternateSentinel (), authorPrefersDark);
22+ }, 100 );
23+ });
24+ });
25+ </script >
1626<input type =" hidden" id =" giscus-base-theme" value =" <%- giscus.baseTheme %>" >
1727<input type =" hidden" id =" giscus-alt-theme" value =" <%- giscus.altTheme %>" >
Original file line number Diff line number Diff line change 189189 toggleGiscusIfUsed (toAlternate, darkModeDefault);
190190 };
191191
192+ window .toggleGiscusIfUsed = toggleGiscusIfUsed;
193+
192194 < % if (respectUserColorScheme) { % >
193195 queryPrefersDark .addEventListener (" change" , e => {
194196 if (window .localStorage .getItem (" quarto-color-scheme" ) !== null )
You can’t perform that action at this time.
0 commit comments