Files
v2.xevion.dev/assets/js/custom.js
2022-04-10 22:23:21 -05:00

13 lines
452 B
JavaScript

// Easter egg feature! 🐣️
window.onload = () => {
let commit = document.querySelector("#commit-id > a");
if (commit != null) {
let colorCode = commit.innerHTML.trim().substring(1, 7);
commit.addEventListener('mouseover', function handler() {
commit.style.color = `#${colorCode}`;
})
commit.addEventListener('mouseout', function handler() {
commit.style.color = '';
})
}
}