mirror of
https://github.com/Xevion/v2.xevion.dev.git
synced 2025-12-08 22:09:06 -06:00
12 lines
421 B
JavaScript
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 = '';
|
|
})
|
|
}
|
|
} |