davidbauer / Instacurate

Turn your Twitter timeline into a personalised news site, in an instant. Fetches links from your timeline and displays them in a discovery friendly design.
http://www.instacurate.com
113 stars 29 forks source link

Display profile pic and bio of instacurated user #90

Closed davidbauer closed 11 years ago

davidbauer commented 11 years ago

not really a technical issue but a question of design.

davidbauer commented 11 years ago

One for you, guys. For the profile pic, twitter delivers an url of type http://a0.twimg.com/profile_images/2596092158/afpecvf41m8f0juql78p_normal.png, if I want a bigger version of it, I need to change the "normal" at the end to "bigger". How do I do that? I'm sure there's an URI method for that.

oliverwehn commented 11 years ago

Try it like this:

var url_normal = 'http://a0.twimg.com/profile_images/2596092158/afpecvf41m8f0juql78p_normal.png';
var url_bigger = url_normal.replace(/_normal(\.[a-z]{3,4})$/, '_bigger$1'); 
davidbauer commented 11 years ago

Thanks.