mirror of
https://github.com/Xevion/v2.xevion.dev.git
synced 2025-12-06 07:16:49 -06:00
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:
@@ -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);
|
||||||
Reference in New Issue
Block a user