Finished poring quality modal

Fixed download issue
This commit is contained in:
RemixDev 2020-04-16 15:52:07 +02:00
parent f094171583
commit 9c4c88e411

View File

@ -222,6 +222,24 @@ function changeTab(evt, section, tabName) {
var modalQuality = document.getElementById('modal_quality');
modalQuality.open = false
window.onclick = function(event) {
if (event.target == modalQuality && modalQuality.open) {
$(modalQuality).addClass('animated fadeOut')
}
}
$(modalQuality).on('webkitAnimationEnd', function () {
if (modalQuality.open){
$(this).removeClass('animated fadeOut')
$(this).css('display', 'none')
modalQuality.open = false
}else{
$(this).removeClass('animated fadeIn')
$(this).css('display', 'block')
modalQuality.open = true
}
})
function openQualityModal(link){
$(modalQuality).data("url", link)
$(modalQuality).css('display', 'block')
@ -239,5 +257,4 @@ function modalQualityButton(bitrate){
sendAddToQueue(url, bitrate)
}
$(modalQuality).addClass('animated fadeOut')
$(modalQuality).css('display', 'none')
}