Files
v2.xevion.dev/assets/js/custom.js
Xevion 0b3e49be94 Move custom javascript into custom.js
- May be affected by compressor layout
2022-04-10 22:21:13 -05:00

12 lines
421 B
JavaScript

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 = '';
})
}
}