Created
September 24, 2010 21:33
-
-
Save funkatron/596092 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
/** | |
* Add some custom timeline filters | |
* | |
* There are five timeline filter objects: | |
* - Spaz.TimelineFilters.friends | |
* - Spaz.TimelineFilters['public'] | |
* - Spaz.TimelineFilters.lists | |
* - Spaz.TimelineFilters.search | |
* - Spaz.TimelineFilters.other | |
* | |
* "other" is applied to all other timelines. | |
* | |
* We can use a filter to delete a timeline entry entirely by returning null | |
* | |
*/ | |
Spaz.TimelineFilters.friends.addFilter('noTweetdeck', function(d) { | |
if (d.source && d.source.indexOf('TweetDeck') !== -1) { // if the source contains "TweetDeck", remove it | |
sch.debug('Removing '+d.id+' from results (TweetDeck)'); | |
d = null; | |
} | |
return d; | |
}); | |
Spaz.TimelineFilters.friends.addFilter('no4sq', function(d) { | |
if (d.text && d.text.toLowerCase().indexOf('http://4sq.com') !== -1) { // if a 4sq link is present, remove it | |
sch.debug('Removing '+d.id+' from results (4sq)'); | |
d = null; | |
} | |
return d; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment