Skip to content

Commit

Permalink
display
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Dec 18, 2011
1 parent 82b2a0d commit a112a32
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions public/javascripts/app.js
Expand Up @@ -6,22 +6,20 @@ o = $;
// boot

o(function(){
render('screenshot', {
title: 'Google',
url: 'google.com'
}).appendTo('body');

render('screenshot', {
title: 'Yahoo',
url: 'yahoo.com'
}).appendTo('body');

render('screenshot', {
title: 'Bing',
url: 'bing.com'
}).appendTo('body');
screenshots(0, 5, function(objs){
objs.forEach(function(obj){
render('screenshot', {
title: obj.url.replace(/^https?:\/\//, ''),
url: obj.url
}).appendTo('body');
})
});
})

function screenshots(from, to, fn) {
o.get('/screenshots/' + from + '..' + to, fn);
}

/**
* Render the given template `name` with `obj`.
*/
Expand Down

0 comments on commit a112a32

Please sign in to comment.