Revert "Use onload handler to set giscus theme as soon as it's loaded"

This reverts commit 7eb1426e1f.
This commit is contained in:
Philipp Oppermann
2021-10-17 18:35:45 +02:00
parent 7eb1426e1f
commit d6bf1b2271
2 changed files with 6 additions and 8 deletions

View File

@@ -1,4 +1,9 @@
window.onload = function () {
let theme = localStorage.getItem("theme");
if (theme != null) {
set_theme(theme)
}
let container = document.querySelector('#toc-aside');
if (container != null) {
resize_toc(container);
@@ -91,9 +96,3 @@ function set_giscus_theme(theme) {
}
}
function giscus_loaded() {
let theme = localStorage.getItem("theme");
if (theme != null) {
set_giscus_theme(theme)
}
}