Infinity Scroll

automatically creates element if user is near of the page bottom.

Stan na 02-03-2022. Zobacz najnowsza wersja.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name Infinity Scroll
// @namespace -
// @version 0.1
// @description automatically creates element if user is near of the page bottom.
// @author NotYou
// @include *
// @require https://code.jquery.com/jquery-3.3.1.min.js
// @run-at document-idle
// @license GPL-3.0-or-later
// @grant none
// ==/UserScript==

// NOTE //
// Doesn't work if you can't scroll page //

(function() {
let css = '.infinityScroll{padding: 0% 0% 100%;}';
if (typeof GM_addStyle !== "undefined") {
  GM_addStyle(css);
} else {
  let styleNode = document.createElement("style");
  styleNode.appendChild(document.createTextNode(css));
  (document.querySelector("head") || document.documentElement).appendChild(styleNode);
}
})();


window.onscroll = function(ev) {
    if((window.innerHeight + window.scrollY) >= document.body.offsetHeight - 100) {
        $('body').append('<div class=infinityScroll></div>')
    }
};