瀏覽代碼

Hashtags!

master
Ben Kurtovic 12 年之前
父節點
當前提交
31ea3aed26
共有 1 個檔案被更改,包括 1 行新增0 行删除
  1. +1
    -0
      js/tweets.js

+ 1
- 0
js/tweets.js 查看文件

@@ -35,6 +35,7 @@ function show_tweets(tweets, element) {
function fmt_text(t) {
t = t.replace(/(http:\/\/.*?(\s|$))/ig, '<a href="$1">$1</a>$2');
t = t.replace(/\@(.*?)(\s|$)/ig, '<a href="http://twitter.com/$1">@$1</a>$2');
t = t.replace(/\#(.*?)(\s|$)/ig, '<a href="http://twitter.com/search/%23$1">#$1</a>$2');
return t;
}



Loading…
取消
儲存