Greasy Fork is available in English.

Porndig - Auto Show More Content

Porndig - Auto Show More Content (Excluded Home Page). Porndig 自动展示更多内容(不包含首页)

// ==UserScript==
// @name         Porndig - Auto Show More Content
// @namespace    http://tampermonkey.net/
// @version      1.4
// @description  Porndig - Auto Show More Content (Excluded Home Page). Porndig 自动展示更多内容(不包含首页)
// @author       Martin______X
// @match        https://www.porndig.com/*
// @exclude      https://www.porndig.com/
// @exclude      https://www.porndig.com/amateur
// @icon         https://www.google.com/s2/favicons?sz=64&domain=porndig.com
// @grant        none
// @license      MIT
// ==/UserScript==

/* */
let $button1 = "visible load_more_btn js_loader_more_btn";

const simpleClick = (async (load_more) => {
    load_more.click();
});
const loadMoreInterval = setInterval(() => {
    //
    let load_more = document.getElementsByClassName($button1)[0];
    //
    let url_3rd = document.URL.split('/')[4].trim();
    if(load_more){
        if(url_3rd==""){
            let rect = load_more.getBoundingClientRect();
            if(rect.bottom <= (window.innerHeight || document.documentElement.clientHeight)){
                simpleClick(load_more);
            }
        }else{
            simpleClick(load_more);
        }
    }
    //
}, 1);