-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
83 lines (54 loc) · 1.34 KB
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
// JavaScript Document
$(document).ready(function() {
var isiPad = navigator.userAgent.indexOf("iPad") != -1;
var isiPod = navigator.userAgent.indexOf("iPhone") != -1;
//checkDevice(isiPad, isiPod);
getJson();
});
(function(d, s, id)
{
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/es_LA/all.js#xfbml=1&appId=184596621607783";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
function clicked(lnk)
{
//window.open(lnk,'mywindow','width=400,height=200')
$(".iframe1").html("<iframe src='"+lnk+"'></iframe>");
}
function getJson()
{
$.getJSON('streamApi.php', function(data) {
var streamMeta = [];
$.each(data, function(key, val) {
streamMeta.push(val);
});
$(".currentSong").html("Ahora suena: "+streamMeta[8]);
$(".nextSong").html("A continuación: "+streamMeta[9]);
});
startTimer();
}
function startTimer()
{
var timer = $.timer(function() {
getJson();
});
timer.set({ time : 20000, autostart : true });
}
function checkDevice(isiPad, isiPod){
//alert("no mames");
if(isiPad)
{
// do nothing
}
else if(isiPod)
{
//alert("iPhone")
}
else
{
location.href="http://wfm.fm/dsk/";
}
}