Youtube Subscriptions infinite

https://www.reddit.com/r/GreaseMonkey/comments/3kvo24/request_infinate_scroll_for_youtube/

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

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

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

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

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

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

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

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

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

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

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

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

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

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

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name        Youtube Subscriptions infinite
// @author      /r/defproc
// @namespace   https://www.reddit.com/r/GreaseMonkey/comments/3kvo24/request_infinate_scroll_for_youtube/?solution
// @description https://www.reddit.com/r/GreaseMonkey/comments/3kvo24/request_infinate_scroll_for_youtube/
// @include     https://www.youtube.com/feed/subscriptions
// @version     1
// @grant       none
// ==/UserScript==

window.addEventListener("scroll", function(){
  var button = document.querySelectorAll('.browse-items-load-more-button');
  var getTop = function(el){
    return el.offsetParent ? el.offsetTop + getTop(el.offsetParent) : el.offsetTop;
  };
  if(button.length === 0) return;
  if(window.scrollY > (getTop(button[0]) - (window.innerHeight * 0.9))) {
    button[0].click();
  }
}, false);