Thursday, February 07, 2008

Twitter Badge with links

I just added the twitter badge to this blog, but it annoyed me that the text was not linkified as it is in twitter's page.

hence, had to modify it slightly:
http://www.pedro.not.br/js/blogger.js (link probably won't be permanent)

Hopefully, this patch will be applied in the original too, since it's definetly a feature most users would want.

4 comments:

Cedric said...

Very useful! Nice trick

Cedric said...

By the way, did you report this to Twitter guys? They should do something for the RSS feed too since the problem still occurs...

Pedro said...

Hi Cedric. Actually, I did report. But hadn't had a response yet... let's see what happens.

Cedric said...

Hi Pedro,

Actually your regex (linkfy) should exclude trailing punctuation:

"Hello click here: http://myurl.com/foo, it sounds great" will return "http://myurl.com/foo,"

Have any tips?

Thanks!

Cédric