mirror of
				https://github.com/KevinMidboe/zoff.git
				synced 2025-10-29 18:00:23 +00:00 
			
		
		
		
	Fixed errors with keydown and keyup on desktop
This commit is contained in:
		@@ -200,11 +200,11 @@
 | 
				
			|||||||
            <div id="playlist" class="col s12 m3">
 | 
					            <div id="playlist" class="col s12 m3">
 | 
				
			||||||
              <div id="top-button" title="Scroll to the top" class="rounded-bottom hide top-button-with-tabs hide-on-small-only">Top</div>
 | 
					              <div id="top-button" title="Scroll to the top" class="rounded-bottom hide top-button-with-tabs hide-on-small-only">Top</div>
 | 
				
			||||||
              <div id="bottom-button" title="Scroll to the bottom" class="rounded-top hide hide-on-small-only">Bottom</div>
 | 
					              <div id="bottom-button" title="Scroll to the bottom" class="rounded-top hide hide-on-small-only">Bottom</div>
 | 
				
			||||||
              <ul class="tabs playlist-tabs" style="width:96%">
 | 
					              <ul class="tabs playlist-tabs hide" style="width:96%">
 | 
				
			||||||
                <li class="tab col s3"><a class="playlist-tab-links playlist-link active" href="#wrapper">Playlist</a></li>
 | 
					                <li class="tab col s3"><a class="playlist-tab-links playlist-link active" href="#wrapper">Playlist</a></li>
 | 
				
			||||||
                <li class="tab col s3"><a class="playlist-tab-links chat-link" href="#chat">Chat</a></li>
 | 
					                <li class="tab col s3"><a class="playlist-tab-links chat-link" href="#chat">Chat</a></li>
 | 
				
			||||||
              </ul>
 | 
					              </ul>
 | 
				
			||||||
              <ul class="tabs playlist-tabs-loggedIn hide" style="width: 96%;">
 | 
					              <ul class="tabs playlist-tabs-loggedIn" style="width: 96%;">
 | 
				
			||||||
                <li class="tab col s3"><a class="playlist-tab-links playlist-link active" href="#wrapper">Playlist</a></li>
 | 
					                <li class="tab col s3"><a class="playlist-tab-links playlist-link active" href="#wrapper">Playlist</a></li>
 | 
				
			||||||
                <li class="tab col s3"><a class="playlist-tab-links suggested-link" href="#suggestions">Suggested</a></li>
 | 
					                <li class="tab col s3"><a class="playlist-tab-links suggested-link" href="#suggestions">Suggested</a></li>
 | 
				
			||||||
                <li class="tab col s3"><a class="playlist-tab-links chat-link" href="#chat">Chat</a></li>
 | 
					                <li class="tab col s3"><a class="playlist-tab-links chat-link" href="#chat">Chat</a></li>
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										2
									
								
								static/dist/embed.min.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								static/dist/embed.min.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										4
									
								
								static/dist/main.min.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								static/dist/main.min.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							@@ -266,9 +266,8 @@ $(document).on("click", "#chat-btn", function(){
 | 
				
			|||||||
    $("#favicon").attr("href", "static/images/favicon.png");
 | 
					    $("#favicon").attr("href", "static/images/favicon.png");
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$(document).on('keydown', ".search_input", function(event) {
 | 
					function searchTimeout(event) {
 | 
				
			||||||
 | 
						search_input = $(".search_input").val();
 | 
				
			||||||
	search_input = $(this).val();
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	code = event.keyCode || event.which;
 | 
						code = event.keyCode || event.which;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -286,9 +285,17 @@ $(document).on('keydown', ".search_input", function(event) {
 | 
				
			|||||||
			timer=100;*/
 | 
								timer=100;*/
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if(/iPad|iPhone|iPod/.test(navigator.userAgent)){
 | 
				
			||||||
});
 | 
						$document.on('keydown', '.search_input', function(event) {
 | 
				
			||||||
 | 
							searchTimeout(event);
 | 
				
			||||||
 | 
						});
 | 
				
			||||||
 | 
					} else {
 | 
				
			||||||
 | 
						$(document).on('keyup', ".search_input", function(event) {
 | 
				
			||||||
 | 
							searchTimeout(event);
 | 
				
			||||||
 | 
						});
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$(document).on("click", ".chat-tab", function(){
 | 
					$(document).on("click", ".chat-tab", function(){
 | 
				
			||||||
    $("#text-chat-input").focus();
 | 
					    $("#text-chat-input").focus();
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -24,7 +24,6 @@ var Search = {
 | 
				
			|||||||
      if(window.search_input !== ""){
 | 
					      if(window.search_input !== ""){
 | 
				
			||||||
        searching = true;
 | 
					        searching = true;
 | 
				
			||||||
        var keyword= encodeURIComponent(window.search_input);
 | 
					        var keyword= encodeURIComponent(window.search_input);
 | 
				
			||||||
 | 
					 | 
				
			||||||
        //response= x
 | 
					        //response= x
 | 
				
			||||||
        var yt_url = "https://www.googleapis.com/youtube/v3/search?key="+api_key+"&videoEmbeddable=true&part=id&fields=items(id)&type=video&order=viewCount&safeSearch=none&maxResults=25";
 | 
					        var yt_url = "https://www.googleapis.com/youtube/v3/search?key="+api_key+"&videoEmbeddable=true&part=id&fields=items(id)&type=video&order=viewCount&safeSearch=none&maxResults=25";
 | 
				
			||||||
        yt_url+="&q="+keyword;
 | 
					        yt_url+="&q="+keyword;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user