flickr embedding doesn't break the JS anymore

This commit is contained in:
Jonne Haß 2012-01-26 05:38:43 +01:00
parent e170829bf7
commit bddd9b244f

View file

@ -8,7 +8,12 @@ app.views.Content = app.views.StreamObject.extend({
function embedHTML(model){
if(!model.get("o_embed_cache")) { return ""; }
return model.get("o_embed_cache").data.html
var data = model.get("o_embed_cache").data;
if(data.type == "photo") {
return '<img src="'+data.url+'" width="'+data.width+'" height="'+data.height+'" />';
} else {
return data.html || ""
}
}
}
})