Added searchbar quality modal with ctrl+enter

This commit is contained in:
RemixDev 2020-04-16 15:28:19 +02:00
parent 379fde07b3
commit aa4cc2a207

View File

@ -149,13 +149,16 @@ var playlistSearch = new Vue({
})
// Search section
$("#searchbar").keyup(function(e){
$("#searchbar").keydown(function(e){
if(e.keyCode == 13){
term = this.value
console.log(term)
if (isValidURL(term))
sendAddToQueue(term);
else{
term = this.value
if (isValidURL(term)){
if (e.ctrlKey){
openQualityModal(term);
}else{
sendAddToQueue(term);
}
}else{
document.getElementById("search_tab_content").style.display = "none";
socket.emit("mainSearch", {term: term});
}