Skip to content

Commit

Permalink
yay
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrien Cahen committed Jul 28, 2010
1 parent 5a9fca6 commit c026446
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion grfModuleSet.js
Expand Up @@ -92,7 +92,7 @@
dataType: 'json',
success: function(data){
try {
console.debug(data);
console.debug(that.sKey,data);
that.JSONpCallback(data);
that.doneLoading();
}
Expand Down
20 changes: 9 additions & 11 deletions modules.js
Expand Up @@ -27,17 +27,15 @@ MODULES = [
JSONpCallback: function(data) {
var html = '<ol>';
$.each(data,function(i){
html += '<li class="item'+i+'"><div class="text">' + $.grfLinkifyUrls(this.text);
html += '</div><div class="meta"><span class="when"><a href="http://twitter.com/'+this.user.screen_name+'/status/'+this.id+'">' +
$.grfTimeAgo(this.created_at)+'</a></span>';
if(this.source) {
html += ' <span class="source">via '+this.source+'</span>';
}
console.log(this);
if(this.place && this.geo) {
var g = this.geo.coordinates;
html += ' <span class="geo"><a href="http://maps.google.com/maps?q='+g[0]+','+g[1]+'">from</a>' +
' <a href="http://twitter.com/search?q=place%3A'+this.place.id+'">'+this.place.full_name+'</a></span>';
html += '<li class="item'+i+'"><div class="text">' + $.grfLinkifyUrls(this.text)
+ '</div><div class="meta"><span class="when"><a href="http://twitter.com/'+this.user.screen_name+'/status/'+this.id+'">'
+ $.grfTimeAgo(this.created_at)+'</a></span>';
if(this.source) { html += ' <span class="source">via '+this.source+'</span>'; }
if(this.place) {
var g = this.geo && this.geo.coordinates;
html += ' <span class="geo">'
+ (g ? '<a href="http://maps.google.com/maps?q='+g[0]+','+g[1]+'">from</a>' : 'from')
+ ' <a href="http://twitter.com/search?q=place%3A'+this.place.id+'">'+this.place.full_name+'</a></span>';
}
html += '.</div></li>';
});
Expand Down

0 comments on commit c026446

Please sign in to comment.