Last active
October 30, 2024 13:50
-
-
Save eykanal/a0b30e035d8c15995deeffec6ab21866 to your computer and use it in GitHub Desktop.
Automatic scroll to bottom of page in twitter and facebook
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
// ==UserScript== | |
// @name AutoScroll | |
// @namespace https://gist.github.com/eykanal/a0b30e035d8c15995deeffec6ab21866 | |
// @version 0.1 | |
// @description Automatically scroll to the bottom of the page | |
// @author Eliezer Kanal | |
// @match https://www.facebook.com/search/str/* | |
// @match https://twitter.com/search* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
var lastScrollHeight = 0; | |
function autoScroll() { | |
var sh = document.documentElement.scrollHeight; | |
if (sh != lastScrollHeight) { | |
lastScrollHeight = sh; | |
document.documentElement.scrollTop = sh; | |
} | |
} | |
window.setInterval(autoScroll, 100); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Saved my day