Add js for marquee (non-functional atm)

This commit is contained in:
yazninja 2022-01-25 00:25:33 +08:00 committed by GitHub
parent e2f3647d97
commit dc6f56e04f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3373,7 +3373,16 @@ const app = new Vue({
//this.modals.qrcode = true;
}
function checkMarquee(){
if(isElementOverflowing('#app-main > div.app-chrome > div.app-chrome--center > div > div > div.playback-info > div.song-artist') == true) {
document.getElementsByClassName('song-artist')[0].classList.add('marquee');
document.getElementsByClassName('song-artist')[1].classList.add('marquee-after');
}
if(isElementOverflowing('#app-main > div.app-chrome > div.app-chrome--center > div > div > div.playback-info > div.song-name') == true) {
document.getElementsByClassName('song-name')[0].classList.add('marquee');
document.getElementsByClassName('song-name')[1].classList.add('marquee-after');
}
}
}
})
@ -3663,4 +3672,4 @@ document.addEventListener('keydown', function(event) {
ipcRenderer.send('detachDT','')
} catch (e) { }
}
});
});