[c] debug change to red on hover and not always

This commit is contained in:
Sangelo 2024-06-11 23:37:17 +02:00
parent 77ff08f737
commit 77d866f3c9

View file

@ -17,12 +17,16 @@
function checkOverflow() { function checkOverflow() {
const modCards = document.querySelectorAll('.mod-card'); const modCards = document.querySelectorAll('.mod-card');
modCards.forEach((modCard) => { modCards.forEach((modCard) => {
modCard.addEventListener('mouseover', () => {
if (modCard.scrollHeight > modCard.offsetHeight) { if (modCard.scrollHeight > modCard.offsetHeight) {
modCard.style.backgroundColor = 'red'; modCard.style.backgroundColor = 'red';
} else {
modCard.style.backgroundColor = '';
} }
}); });
modCard.addEventListener('mouseout', () => {
modCard.style.backgroundColor = '';
});
});
} }
async function fetchData(file) { async function fetchData(file) {