mirror of
https://github.com/Xevion/v2.xevion.dev.git
synced 2025-12-07 05:17:00 -06:00
Move custom javascript into custom.js
- May be affected by compressor layout
This commit is contained in:
12
assets/js/custom.js
Normal file
12
assets/js/custom.js
Normal file
@@ -0,0 +1,12 @@
|
||||
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 = '';
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user