Safari Endless Scrolling

Infinitely scroll through pages on Safari

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         Safari Endless Scrolling
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Infinitely scroll through pages on Safari
// @match        https://*/*
// @match        http://*/*
// @require      https://code.jquery.com/jquery-3.6.0.min.js
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Set the distance from the bottom when to trigger the next page load
    var loadOffset = 2000;

    // Function to check if the user has reached the bottom of the page
    function nearBottomOfPage() {
        return $(window).scrollTop() > $(document).height() - $(window).height() - loadOffset;
    }

    // Function to load more content when near the bottom of the page
    function loadMoreContent() {
        // Simulate loading more content by scrolling to the bottom of the page
        window.scrollTo(0, document.body.scrollHeight);
    }

    // Load more content when the user scrolls near the bottom of the page
    $(window).scroll(function() {
        if (nearBottomOfPage()) {
            loadMoreContent();
        }
    });
})();