Warning: fopen(/www/sites/update.greasyfork.icu/index/store/temp/50d57a686f8a3629ff966559dda51048.js): failed to open stream: No space left on device in /www/sites/update.greasyfork.icu/index/scriptControl.php on line 65
// ==UserScript==
// @name Niconico AutoPagerize
// @namespace https://foooomio.net/
// @description ニコニコ動画のユーザーページにAutoPager機能を追加する
// @version 0.7
// @author foooomio
// @license MIT License
// @match https://www.nicovideo.jp/my*
// @match https://www.nicovideo.jp/user/*
// @run-at document-end
// @grant none
// @downloadURL https://update.greasyfork.icu/scripts/370902/Niconico%20AutoPagerize.user.js
// @updateURL https://update.greasyfork.icu/scripts/370902/Niconico%20AutoPagerize.meta.js
// ==/UserScript==
(() => {
'use strict';
const $ = document.querySelector.bind(document);
if (!$('.UserPage-main')) return;
const autopager = new IntersectionObserver(([entry]) => {
if (entry.isIntersecting) {
entry.target.click();
}
});
new MutationObserver(() => {
const target = $('.Timeline-more, .ShowMoreList-more');
if (target) {
autopager.disconnect();
autopager.observe(target);
}
}).observe($('.UserPage-main'), { childList: true, subtree: true });
})();