pulling from ftp

This commit is contained in:
Kasper Rynning-Tønnesen
2014-10-10 21:38:26 +02:00
parent a666f718c2
commit f8dc61e507
13 changed files with 40 additions and 25 deletions

14
js/youtube.js Executable file → Normal file
View File

@@ -41,8 +41,16 @@ $(document).ready(function()
}).responseText;
//console.log(response);
response = $.parseJSON(response);
for(first in response["nowPlaying"]) break;
console.log(first);
console.log(response["nowPlaying"].length);
try{
for(first in response["nowPlaying"]) break;
console.log(first);
response = first;
}catch(err){
response = "1";
}
$.ajax({
type: 'get',
url: 'php/timedifference.php',
@@ -54,7 +62,7 @@ $(document).ready(function()
});
console.log("timediff:"+timeDifference[0]);
response = first;
tag = document.createElement('script');
tag.src = "https://www.youtube.com/iframe_api";