better events

This commit is contained in:
Simon 2023-08-24 21:48:34 +07:00
parent c3079d81ff
commit cd5e9a8c0a
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4

View File

@ -283,14 +283,14 @@ function processTitle(titleContainer) {
}); });
titleContainer.classList.add('title-container'); titleContainer.classList.add('title-container');
titleContainer.addEventListener('mouseover', () => { titleContainer.addEventListener('mouseenter', () => {
const taButton = titleContainer.querySelector('.ta-button'); const taButton = titleContainer.querySelector('.ta-button');
if (!taButton) return; if (!taButton) return;
if (!taButton.isChecked) checkVideoExists(taButton); if (!taButton.isChecked) checkVideoExists(taButton);
taButton.style.opacity = 1; taButton.style.opacity = 1;
}); });
titleContainer.addEventListener('mouseout', () => { titleContainer.addEventListener('mouseleave', () => {
const taButton = titleContainer.querySelector('.ta-button'); const taButton = titleContainer.querySelector('.ta-button');
if (!taButton) return; if (!taButton) return;
taButton.style.opacity = 0; taButton.style.opacity = 0;