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 // Search section
$("#searchbar").keyup(function(e){ $("#searchbar").keydown(function(e){
if(e.keyCode == 13){ if(e.keyCode == 13){
term = this.value term = this.value
console.log(term) if (isValidURL(term)){
if (isValidURL(term)) if (e.ctrlKey){
sendAddToQueue(term); openQualityModal(term);
else{ }else{
sendAddToQueue(term);
}
}else{
document.getElementById("search_tab_content").style.display = "none"; document.getElementById("search_tab_content").style.display = "none";
socket.emit("mainSearch", {term: term}); socket.emit("mainSearch", {term: term});
} }