Updated what to cache, and updated offline-page

This commit is contained in:
Kasper Rynning-Tønnesen
2016-08-15 16:05:21 +02:00
parent 3f152acc57
commit 85081497aa
16 changed files with 88 additions and 110 deletions

View File

@@ -4,7 +4,7 @@ var Suggestions = {
if(single){
Suggestions.createSuggested(params);
}else{
for(x in params){
for(var x in params){
Suggestions.createSuggested(params[x]);
}
}
@@ -54,7 +54,7 @@ var Suggestions = {
var video_id = song.id;
var video_title = song.snippet.title;
duration = duration.replace("PT","").replace("H","h ").replace("M","m ").replace("S","s")
duration = duration.replace("PT","").replace("H","h ").replace("M","m ").replace("S","s");
$("#suggest-song-html").append(List.generateSong({id: video_id, title: video_title, length: secs, duration: duration}, false, false, false));
});
@@ -65,8 +65,8 @@ var Suggestions = {
},
checkUserEmpty: function(){
var length = $("#user-suggest-html").children().length
if(length == 0){
var length = $("#user-suggest-html").children().length;
if(length === 0){
if(!Helper.contains($("#user_suggests").attr("class").split(" "), "hide"))
$("#user_suggests").addClass("hide");
}else{
@@ -74,4 +74,4 @@ var Suggestions = {
}
},
}
};