1
0
Fork 0
Browse Source

removing trailing spaces for siinus

master
IngridRegina 4 years ago
parent
commit
23dbdcd441
  1. 18
      script.js

18
script.js

@ -10,10 +10,10 @@ function update(){ @@ -10,10 +10,10 @@ function update(){
if (first == null) {
playing = 'Mitte munnigi ei mängi prg';
}
else if (first.artist != undefined) {
playing = first.artist + ' - ';
playing += first.title;
} else {
else if (first.artist != undefined) {
playing = first.artist + ' - ';
playing += first.title;
} else {
playing += first.title;
}
var nowPlaying = playing;
@ -31,16 +31,16 @@ function update_field(field, data){ @@ -31,16 +31,16 @@ function update_field(field, data){
}
function update_listeners(json_obj){
var nowPlaying = getFirstPlaying(json_obj);
var nowPlaying = getFirstPlaying(json_obj);
if(nowPlaying != null) {
update_field('listeners1', nowPlaying.listeners);
}
}
}
function autoupdate(){
update();
setInterval(function(){ update(); }, 30000);
setInterval(function(){ update(); }, 30000);
}
function change_bg(id){
@ -60,9 +60,9 @@ function getFirstPlaying(jsonObj){ @@ -60,9 +60,9 @@ function getFirstPlaying(jsonObj){
for(o=0; o < sources.length; o++) {
if (sources[o].title != undefined && masterStreams.some(stream=>sources[o].listenurl.endsWith(stream))) { //check if source has a title key AND belongs to masterStreams
return sources[o];
}
}
}
return null;
}

Loading…
Cancel
Save