Created
September 24, 2010 21:29
-
-
Save funkatron/596086 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Spaz.TimelineFilters.defaultEntryFilters = [ | |
{ | |
'label':'nl2br', | |
'func':function(d) { | |
d.text = sch.nl2br(d.text); | |
if (d.SC_is_retweet) { | |
d.retweeted_status.text = sch.nl2br(d.retweeted_status.text); | |
} | |
return d; | |
} | |
}, | |
{ | |
'label':'autolink', | |
'func':function(d) { | |
d.text = sch.makeClickable(d.text, SPAZ_MAKECLICKABLE_OPTS); | |
if (d.SC_is_retweet) { | |
d.retweeted_status.text = sch.makeClickable(d.retweeted_status.text, SPAZ_MAKECLICKABLE_OPTS); | |
} | |
return d; | |
} | |
}, | |
{ | |
'label':'emoticons', | |
'func':function(d) { | |
d.text = Emoticons.SimpleSmileys.convertEmoticons(d.text); | |
if (d.SC_is_retweet) { | |
d.retweeted_status.text = Emoticons.SimpleSmileys.convertEmoticons(d.retweeted_status.text); | |
} | |
return d; | |
} | |
}, | |
{ | |
'label':'markdown', | |
'func':function(d) { | |
var md = new Showdown.converter(); | |
d.text = md.makeHtml(d.text); | |
d.text = d.text.replace(/href="([^"]+)"/gi, 'href="$1" title="Open link in a browser window" class="inline-link"'); | |
return d; | |
} | |
}, | |
{ | |
'label':'getImageURLs', | |
'func':function(d) { | |
var sui = new SpazImageURL(); | |
if (d.SC_is_retweet) { | |
d.SC_thumbnail_urls = sui.getThumbsForUrls(d.retweeted_status.text); | |
} else { | |
d.SC_thumbnail_urls = sui.getThumbsForUrls(d.SC_text_raw||d.text); | |
} | |
return d | |
} | |
}, | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment