making the avatar an actual img tag

This fixes a bug, where animated gifs were rendered incorrectly.
This commit is contained in:
Samuel Reis 2010-09-20 22:06:46 +02:00
parent cc46e88522
commit ecfa499ff4
2 changed files with 2 additions and 4 deletions

View file

@ -56,7 +56,7 @@ Twittia.prototype.getItem = function(status) {
template.reply_to.onclick = function() { replyTo(status.user.screen_name, status.id); return false; }
template.retweet.onclick = function() { template.retweet.className = "hidden"; _this.retweet(status.id, template.item); return false; }
template.image.style.backgroundImage = "url(" + status.user.profile_image_url + ")";
template.image.src = status.user.profile_image_url;
template.username.innerText = status.user.screen_name;
template.username.href = "http://twitter.com/" + status.user.screen_name
@ -116,7 +116,7 @@ Twittia.prototype.getTemplate = function() {
item.appendChild(retweet);
var image = document.createElement("div");
var image = document.createElement("img");
image.className = "image";
item.appendChild(image);