Fix commit hex color hover breaking with glitch effect onLoad override

The new glitch effect session storage management was overriding window.onload,
breaking the commit color hover's onload override. I should probably use addEventListener
for both of them, but I'm busy, I just want it fixed now so I can sleep.
This commit is contained in:
Xevion
2022-11-14 01:52:50 -06:00
parent 133c239f9c
commit 28b2062bfc

View File

@@ -1,5 +1,5 @@
// Easter egg feature! 🐣️ // Easter egg feature! 🐣️
window.onload = () => { setupCommitHover = () => {
let commit = document.querySelector("#commit-id > a"); let commit = document.querySelector("#commit-id > a");
if (commit != null) { if (commit != null) {
let colorCode = commit.innerHTML.trim().substring(1, 7); let colorCode = commit.innerHTML.trim().substring(1, 7);
@@ -10,4 +10,5 @@ window.onload = () => {
commit.style.color = ''; commit.style.color = '';
}) })
} }
} };
window.addEventListener("load", setupCommitHover, true);