irrisponsibly massive commit
This commit is contained in:
parent
4db81a9e51
commit
e4c2d5790b
119 changed files with 16689 additions and 2442 deletions
|
@ -3,6 +3,35 @@ window.addEvent('domready', function() {
|
|||
codeblocks.each(addExpander);
|
||||
});
|
||||
|
||||
window.addEvents({
|
||||
domready: function(){
|
||||
if(twitter_user){
|
||||
new Request.Twitter(twitter_user, {
|
||||
include_replies: false,
|
||||
data: { count: 3 },
|
||||
onSuccess: function(tweets){
|
||||
$('tweets').empty();
|
||||
for (var i = tweets.length; i--; ){
|
||||
new Element('li', {
|
||||
'class': 'tweet'
|
||||
}).adopt(
|
||||
new Element('p', { 'html': tweets[i].text+' ' }).adopt(
|
||||
new Element('a', {
|
||||
'href': 'http://twitter.com/'+twitter_user+'/status/'+tweets[i].id_str,
|
||||
'text': new Date(tweets[i].created_at).timeDiffInWords()
|
||||
}))
|
||||
).inject('tweets', 'top');
|
||||
}
|
||||
}
|
||||
}).send();
|
||||
}
|
||||
$$('#recent_posts time').each(function(date){
|
||||
date.set('text', new Date(date.get('text')).timeDiffInWords());
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
function addExpander(div){
|
||||
new Element('span',{
|
||||
html: 'expand »',
|
||||
|
@ -44,4 +73,4 @@ function enableCompressedLayout(codeblocks){
|
|||
}
|
||||
}
|
||||
}).inject($('main'), 'top');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue