Last active
September 30, 2015 14:17
-
-
Save BaseCase/1805089 to your computer and use it in GitHub Desktop.
Make it obvious which tweet is last read, and make enter key load new tweets.
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
| var adjust_twitter_view = function () { | |
| //reset colors | |
| $('li.stream-item').css('background','#fff'); | |
| //highlight most recent tweet to make it easier to visually ID the new ones | |
| $('li.stream-item').first().css('background','#dedede'); | |
| }; | |
| adjust_twitter_view(); | |
| //attach behavior to the "new tweets" button | |
| $('div.new-tweets-bar').live('click', function(e) { | |
| setTimeout(function() { | |
| adjust_twitter_view(); | |
| }, 8000); | |
| }); | |
| $('body').keydown(function(e) { | |
| if (e.which == 13) { //add a keyboard shortcut to the load new tweets bar | |
| $('div.new-tweets-bar').click(); | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment