Skip to content

Commit 066a860

Browse files
authored
remove redundant lines
1 parent f2c6f64 commit 066a860

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

src/resources/formats/html/giscus/giscus.ejs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -35,28 +35,4 @@ async function loadGiscusWhenReady() {
3535
3636
// Call the async function to start the loop
3737
loadGiscusWhenReady();
38-
setTimeout(() => {
39-
var bodyClass = window.document.body.classList;
40-
const GetTheme = () => {
41-
const baseTheme = document.getElementById('giscus-base-theme').value;
42-
const altTheme = document.getElementById('giscus-alt-theme').value;
43-
return bodyClass.contains('quarto-dark') ? altTheme : baseTheme;
44-
};
45-
const script = document.createElement("script");
46-
script.src = "https://giscus.app/client.js";
47-
script.async = true;
48-
script.dataset.repo = "<%- giscus.repo %>";
49-
script.dataset.repoId = "<%- giscus['repo-id'] %>";
50-
script.dataset.category = "<%- giscus.category %>";
51-
script.dataset.categoryId = "<%- giscus['category-id'] %>";
52-
script.dataset.mapping = "<%- giscus.mapping %>";
53-
script.dataset.reactionsEnabled = "<%- giscus['reactions-enabled'] ? 1 : 0 %>";
54-
script.dataset.emitMetadata = "0";
55-
script.dataset.inputPosition = "<%- giscus['input-position'] %>";
56-
script.dataset.theme = GetTheme();
57-
script.dataset.lang = "<%- giscus.language %>";
58-
script.crossOrigin = "anonymous";
59-
// Insert the Giscus script after the current script
60-
document.getElementById("quarto-content").appendChild(script);
61-
}, 50);
6238
</script>

0 commit comments

Comments
 (0)