Skip to content

Commit

Permalink
Remove 100ms onload theme
Browse files Browse the repository at this point in the history
  • Loading branch information
radito committed Apr 4, 2024
1 parent 85105e7 commit e6df02d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
gtag('js', new Date());
gtag('config', '{{ site.Params.GoogleAnalyticsCustom }}');
};

document.head.appendChild(gasrc);
});
</script>
Expand Down Expand Up @@ -390,8 +390,6 @@

window.addEventListener('load', function () {
document.getElementById("theme-toggle").addEventListener("click", async () => {
await new Promise(r => setTimeout(r, 100));

const choosedTheme = localStorage.getItem("pref-theme");

setSyntaxMode(choosedTheme);
Expand Down

0 comments on commit e6df02d

Please sign in to comment.