1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-19 06:06:54 +00:00

chore: delete JS comments from HTML

This commit is contained in:
Cotes Chung
2024-04-29 03:25:26 +08:00
parent 796c386037
commit 778ebdf250
4 changed files with 13 additions and 11 deletions

View File

@@ -25,12 +25,12 @@
addEventListener('message', (event) => {
let theme;
/* credit to <https://github.com/utterance/utterances/issues/170#issuecomment-594036347> */
{%- comment -%} credit to <https://github.com/utterance/utterances/issues/170#issuecomment-594036347> {%- endcomment -%}
if (event.origin === origin) {
/* page initial */
{%- comment -%} page initial {%- endcomment -%}
theme = initTheme;
} else if (event.source === window && event.data && event.data.direction === ModeToggle.ID) {
/* global theme mode changed */
{%- comment -%} global theme mode changed {%- endcomment -%}
const mode = event.data.message;
theme = mode === ModeToggle.DARK_MODE ? darkTheme : lightTheme;
} else {