mirror of
				https://github.com/KevinMidboe/zoff.git
				synced 2025-10-29 18:00:23 +00:00 
			
		
		
		
	Made remote to onepage site, and changed the pingTimeout serverside
This commit is contained in:
		@@ -26,7 +26,7 @@ catch(err){
 | 
			
		||||
  server = http.createServer(handler);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var io = require('socket.io')(server);
 | 
			
		||||
var io = require('socket.io')(server, {'pingTimeout': 25000});
 | 
			
		||||
 | 
			
		||||
//db
 | 
			
		||||
var mongojs = require('mongojs');
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								static/dist/main.min.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								static/dist/main.min.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										2
									
								
								static/dist/remote.min.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								static/dist/remote.min.js
									
									
									
									
										vendored
									
									
								
							@@ -1 +1 @@
 | 
			
		||||
!function(){var e,t=!0;$(document).ready(function(){document.title="Zöff Remote",setTimeout(function(){$("#search").focus()},500),socket=io.connect("//"+window.location.hostname+":3000"),e=window.location.pathname.split("/")[2],e&&(e=e.toLowerCase(),o.control())}),$("#playbutton").on("click",function(){socket.emit("id",[e,"play","mock"])}),$("#pausebutton").on("click",function(){socket.emit("id",[e,"pause","mock"])}),$("#skipbutton").on("click",function(){socket.emit("id",[e,"skip","mock"])}),$("#remoteform").on("submit",function(){t?window.location.href="/remote/"+document.getElementById("remoteform").chan.value:o.control()});var o={control:function(){t?(e||(e=$("#code-input").val().toLowerCase()),$("#code-input").val(""),t=!1,$(".rc").css("display","block"),$("#remote-text").text("Controlling "+e.toUpperCase()),document.getElementById("search").setAttribute("length","18"),document.getElementById("search").setAttribute("maxlength","18"),$("#forsearch").html("Type new channel name to change to"),$("#volume-control").slider({min:0,max:100,value:100,range:"min",animate:!0,stop:function(t,o){socket.emit("id",[e,"volume",o.value]),console.log("volume")}})):(socket.emit("id",[e,"channel",$("#search").val().toLowerCase()]),$("#search").val(""))}}}();
 | 
			
		||||
!function(){var e=!0;$(document).ready(function(){document.title="Zöff Remote",setTimeout(function(){$("#search").focus()},500),socket=io.connect("//"+window.location.hostname+":3000"),id=window.location.pathname.split("/")[2],id&&(id=id.toLowerCase(),t.control())}),$("#playbutton").on("click",function(){socket.emit("id",[id,"play","mock"])}),$("#pausebutton").on("click",function(){socket.emit("id",[id,"pause","mock"])}),$("#skipbutton").on("click",function(){socket.emit("id",[id,"skip","mock"])}),$("#remoteform").on("submit",function(){t.control()});var t={control:function(){e?(id||(id=document.getElementById("remoteform").chan.value,window.history.pushState("object or string","Title","/remote/"+id)),document.getElementById("remoteform").chan.value="",e=!1,$(".rc").css("display","block"),$("#remote-text").text("Controlling "+id.toUpperCase()),document.getElementById("search").setAttribute("length","18"),document.getElementById("search").setAttribute("maxlength","18"),$("#forsearch").html("Type new channel name to change to"),$("#volume-control").slider({min:0,max:100,value:100,range:"min",animate:!0,stop:function(e,t){socket.emit("id",[id,"volume",t.value]),console.log("volume")}})):(socket.emit("id",[id,"channel",$("#search").val().toLowerCase()]),$("#search").val(""))}}}();
 | 
			
		||||
@@ -1,5 +1,4 @@
 | 
			
		||||
var start = true;
 | 
			
		||||
var id;
 | 
			
		||||
 | 
			
		||||
$(document).ready(function (){
 | 
			
		||||
    document.title = "Zöff Remote";
 | 
			
		||||
@@ -30,10 +29,13 @@ $("#skipbutton").on("click", function()
 | 
			
		||||
 | 
			
		||||
$("#remoteform").on("submit", function()
 | 
			
		||||
{
 | 
			
		||||
  /*
 | 
			
		||||
  if(start)
 | 
			
		||||
    window.location.href = '/remote/'+document.getElementById("remoteform").chan.value;
 | 
			
		||||
  else
 | 
			
		||||
    Remotecontroller.control();
 | 
			
		||||
  */
 | 
			
		||||
  Remotecontroller.control();
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
var Remotecontroller = {
 | 
			
		||||
@@ -42,8 +44,12 @@ var Remotecontroller = {
 | 
			
		||||
  {
 | 
			
		||||
    if(start)
 | 
			
		||||
    {
 | 
			
		||||
      if(!id)id = $("#code-input").val().toLowerCase();
 | 
			
		||||
      $("#code-input").val("");
 | 
			
		||||
      if(!id)
 | 
			
		||||
      {
 | 
			
		||||
          id = document.getElementById("remoteform").chan.value;
 | 
			
		||||
          window.history.pushState("object or string", "Title", "/remote/"+id);
 | 
			
		||||
      }
 | 
			
		||||
      document.getElementById("remoteform").chan.value = "";
 | 
			
		||||
      start = false;
 | 
			
		||||
 | 
			
		||||
      $(".rc").css("display", "block");
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user