NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript==
// @name Reddit infinite autoload
// @namespace http://tampermonkey.net/
// @version 1.0.0
// @description Makes RES infinite Reddit load a screen's worth of content
// @author DecentM
// @include *reddit.com/*
// @grant none
// @license MIT
// ==/UserScript==
((window, document, undefined) => {
'use strict';
window.addEventListener('neverEndingLoad', () => {
const bounding = document.getElementById('progressIndicator').getBoundingClientRect();
const inViewport =
bounding.top >= 0 &&
bounding.left >= 0 &&
bounding.right <= (window.innerWidth || document.documentElement.clientWidth) &&
bounding.bottom <= (window.innerHeight || document.documentElement.clientHeight);
if (inViewport) {
window.dispatchEvent(new Event('scroll'));
}
});
})(window, window.document);