我正在使用一些 JavaScript 来提取我的 Instagram 提要,但我想删除将它们带到 Instagram 页面的每个图像的链接。我尝试了一些尝试,但最终打破了它,有人知道我应该删除什么吗?
embedImage = function(photo) {
var a, img;
img = $('<img/>').attr({
//'src': photo.images.thumbnail.url,
//'width': photo.images.thumbnail.width,
//'height': photo.images.thumbnail.height
'src': photo.images.standard_resolution.url,
'width': photo.images.standard_resolution.width,
'height': photo.images.standard_resolution.height
});
a = $('<a />').attr({
'href': photo.images.standard_resolution.url,
'target': '_blank',
'class': 'pull-left'
}).append(img).appendTo(tag_name);
};
onPhotoLoaded = function(data) {
var photo, _i, _len, _ref, _results;
if (data.meta.code === 200 && data.data) {
_ref = data.data;
_results = [];
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
photo = _ref[_i];
_results.push(embedImage(photo));
}
return _results;
}
};