Skip to content

Instantly share code, notes, and snippets.

@svirmi
Forked from eykanal/autoscroll.user.js
Created March 12, 2024 20:24
Show Gist options
  • Save svirmi/963f7a34617c069649ff7447519547e7 to your computer and use it in GitHub Desktop.
Save svirmi/963f7a34617c069649ff7447519547e7 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);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment