making the avatar an actual img tag
This fixes a bug, where animated gifs were rendered incorrectly.
This commit is contained in:
parent
cc46e88522
commit
ecfa499ff4
2 changed files with 2 additions and 4 deletions
|
@ -56,7 +56,7 @@ Twittia.prototype.getItem = function(status) {
|
||||||
template.reply_to.onclick = function() { replyTo(status.user.screen_name, status.id); return false; }
|
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.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.innerText = status.user.screen_name;
|
||||||
template.username.href = "http://twitter.com/" + 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);
|
item.appendChild(retweet);
|
||||||
|
|
||||||
|
|
||||||
var image = document.createElement("div");
|
var image = document.createElement("img");
|
||||||
image.className = "image";
|
image.className = "image";
|
||||||
item.appendChild(image);
|
item.appendChild(image);
|
||||||
|
|
||||||
|
|
|
@ -86,8 +86,6 @@ p {
|
||||||
margin-left: 2px;
|
margin-left: 2px;
|
||||||
width: 48px;
|
width: 48px;
|
||||||
height: 48px;
|
height: 48px;
|
||||||
background: top left no-repeat;
|
|
||||||
background-clip: content-box;
|
|
||||||
border: 0px solid #f00;
|
border: 0px solid #f00;
|
||||||
-webkit-border-radius: 8px;
|
-webkit-border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue