您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds infinite scrolling to subreddits and to comments.
当前为
// ==UserScript== // @name Reddit Infinite Scrolling // @namespace old.reddit.com // @description Adds infinite scrolling to subreddits and to comments. // @license MIT // @include https://*.reddit.com/* // @icon https://www.redditstatic.com/desktop2x/img/favicon/android-icon-192x192.png // @grant unsafeWindow // @require http://code.jquery.com/jquery-2.1.4.min.js // @require https://cdnjs.cloudflare.com/ajax/libs/jscroll/2.4.1/jquery.jscroll.min.js // @version 1.0 // ==/UserScript== // Jscroll code $('#siteTable').jscroll({ nextSelector: 'span.nextprev a:last', contentSelector: '#siteTable .thing, .nav-buttons', callback: function() { $('.nav-buttons').remove(); } }); //if current URL contains the string 'comments', then click the 'more comments' button when scrolling at the end of the page if (/(.*comments.*)/.test(document.location)) { $(window).scroll(function() { if ($(window).scrollTop() + $(window).height() > $(document).height() - 100) { // console.log('bottom!'); var element = unsafeWindow.document.getElementsByClassName('morecomments'); var last = element.length; element[last - 1].firstChild.click(); } }); }