Skip to content

Instantly share code, notes, and snippets.

@eykanal
Last active April 1, 2024 14:34
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save eykanal/a0b30e035d8c15995deeffec6ab21866 to your computer and use it in GitHub Desktop.
Save eykanal/a0b30e035d8c15995deeffec6ab21866 to your computer and use it in GitHub Desktop.
Automatic scroll to bottom of page in twitter and facebook
// ==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);
})();
@dkumarkumar
Copy link

Can you put Auto scroll down slowly?

@avipars
Copy link

avipars commented Sep 7, 2021

Can you put Auto scroll down slowly?

Just add a sleep function

@RobbyAJM
Copy link

RobbyAJM commented Mar 2, 2022

Saved my day

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment