Last active
September 13, 2018 15:06
-
-
Save daveio/3d00c711c925f3c88b23bdc02f729b75 to your computer and use it in GitHub Desktop.
Auto-refresh for Twitter Web
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
/* Enable commented lines (beneath this documentation) if you want to use in a userscript or similar, | |
otherwise copy all uncommented lines (or the whole gist) and paste into the javascript console. | |
Note that the update will only happen if you're scrolled all the way to the top. This prevents the | |
page jumping around when the update happens. | |
If you're pasting into the Javascript console, bear in mind that if you refresh with your browser, | |
the functionality will be lost and you'll need to paste it in again. | |
MIT licenced | |
Dave Williams (github:daveio), September 2018 */ | |
// $(document).ready(function () { | |
var refresher = setInterval( function () { | |
if ($(document).scrollTop() < 1) { | |
if ($('button.new-tweets-bar').css('visibility') != undefined) { | |
$('button.new-tweets-bar').click(); | |
} | |
} | |
}, 100); | |
// $.refresher = refresher; | |
// } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment