Permalink
Browse files

linkify hashtags in dynamically loaded tweets

  • Loading branch information...
mislav committed Jul 29, 2009
1 parent 8ca319c commit 762de0775f6eba47fa26a8f7bde1710301941f2b
Showing with 4 additions and 4 deletions.
  1. +4 −4 endless_tweets/endless_tweets.js
@@ -332,10 +332,10 @@ if (wrapper) checkUserscriptUpdate(scriptURL, $et.scriptSize, function() {
//= toolkit/notification.js
function twitterLinkify(text) {
- return linkify(text, true).
- replace(/(^|\W)@(\w+)/g, '$1@<a href="/$2">$2</a>')
- // TODO: active hashtags `isSearchLink("processHashtagLink")`
- // replace(/(^|\W)#(\w+)/g, '$1<a href="/search?q=%23$2" title="#$2" class="hashtag">#$2</a>')
+ // TODO: add class "tweet-url web" to external links
+ return linkify(text, true)
+ .replace(/(^|\W)@(\w+)/g, '$1@<a href="/$2">$2</a>')
+ .replace(/(^|\W)#(\w+)/g, '$1<a href="/search?q=%23$2" title="#$2" class="tweet-url hashtag">#$2</a>')
}
function reveal(element) {

0 comments on commit 762de07

Please sign in to comment.