diff --git a/htdocs/js/mpd.js b/htdocs/js/mpd.js index 8b7128d..dae10cc 100644 --- a/htdocs/js/mpd.js +++ b/htdocs/js/mpd.js @@ -292,7 +292,7 @@ function appInit() { domCache.progressBar.value = 0; domCache.progressBar.addEventListener('change', function(event) { - if(current_song && current_song.currentSongId >= 0) { + if (current_song && current_song.currentSongId >= 0) { var seekVal = Math.ceil(current_song.totalTime * (domCache.progressBar.value / 100)); sendAPI({"cmd": "MPD_API_SET_SEEK", "data": {"songid":current_song.currentSongId,"seek": seekVal}}); } @@ -408,7 +408,7 @@ function appInit() { document.getElementById(event.dataTransfer.getData('Text')).remove(); dragEl.style.display = ''; queueBody.insertBefore(dragEl, event.target.parentNode); - var tr = queueBody.getElementsByTagName('tr'); + var tr = queueBody.querySelectorAll('.dragover'); var trLen = tr.length; for (var i = 0; i < trLen; i++) { tr[i].classList.remove('dragover');