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 188188 toggleGiscusIfUsed (toAlternate, darkModeDefault);
189189 };
190190
191+ window .toggleGiscusIfUsed = toggleGiscusIfUsed;
192+
191193 < % if (respectUserColorScheme) { % >
192194 queryPrefersDark .addEventListener (" change" , e => {
193195 if (window .localStorage .getItem (" quarto-color-scheme" ) !== null )
You can’t perform that action at this time.
0 commit comments