Bugfix: javascript error
This commit is contained in:
@@ -148,15 +148,17 @@
|
|||||||
title: $(".now-playing-header .title"),
|
title: $(".now-playing-header .title"),
|
||||||
artist: $(".now-playing-header .artist"),
|
artist: $(".now-playing-header .artist"),
|
||||||
};
|
};
|
||||||
|
console.log($nowPlaying);
|
||||||
$(document).on('onAirUpdated', function (evt, data) {
|
$(document).on('onAirUpdated', function (evt, data) {
|
||||||
var title = data.current.title;
|
console.log(data);
|
||||||
var artist = data.current.artist;
|
var title = data.current ? data.current.title : '';
|
||||||
|
var artist = data.current ? data.current.artist : '';
|
||||||
if (data.inProgram) {
|
if (data.inProgram) {
|
||||||
title = data.program.name;
|
title = data.program.name;
|
||||||
artist = data.program.tagline;
|
artist = data.program.tagline;
|
||||||
}
|
}
|
||||||
$nowPlaying.title.text(data.current.title).attr('title', data.current.title);
|
$nowPlaying.title.text(title).attr('title', title);
|
||||||
$nowPlaying.artist.text(data.current.artist).attr('title', data.current.artist);
|
$nowPlaying.artist.text(artist).attr('title', artist);
|
||||||
$nowPlaying.container.slideDown();
|
$nowPlaying.container.slideDown();
|
||||||
|
|
||||||
document.title = title + " - " + artist + " | NH Gooi";
|
document.title = title + " - " + artist + " | NH Gooi";
|
||||||
|
|||||||
Reference in New Issue
Block a user