Created
April 4, 2011 02:15
-
-
Save funkatron/901048 to your computer and use it in GitHub Desktop.
Stick this in your user.js file. Only tested in current Titanium code
This file contains hidden or 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
| jQuery(document).ready(function() { | |
| /** | |
| * remove this default filter from these timelines -- we'll use embedly below | |
| */ | |
| Spaz.TimelineFilters.friends.removeFilter('getImageURLs'); | |
| Spaz.TimelineFilters.search.removeFilter('getImageURLs'); | |
| Spaz.TimelineFilters['public'].removeFilter('getImageURLs'); | |
| /** | |
| * A helper to load media via embedly | |
| */ | |
| var embedly_listener = function(e) { | |
| /* | |
| loads media | |
| */ | |
| jQuery('div.timeline-entry.new div.status-text a').embedly({ | |
| maxWidth: 250, | |
| maxHeight:300, | |
| 'method':'afterParent', | |
| 'wrapElement':'div', | |
| 'className':'embedly' | |
| } | |
| ); | |
| }; | |
| /** | |
| * add listeners to these hooks | |
| */ | |
| Spaz.Hooks.register('friends_timeline_data_success_finish', embedly_listener); | |
| Spaz.Hooks.register('search_timeline_data_success_finish', embedly_listener); | |
| Spaz.Hooks.register('public_timeline_data_success_finish', embedly_listener); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment