pixiv 自動按下查看全部

try to take over the world!

目前为 2020-07-04 提交的版本。查看 最新版本

// ==UserScript==
// @name         pixiv 自動按下查看全部
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  try to take over the world!
// @author       fmnijk
// @match        https://www.pixiv.net/artworks/*
// @grant        none
// ==/UserScript==

(window.onload = function() {
    'use strict';
    var stop1 = -100;
    function keeptrying1() {
        if(document.querySelector('.emr523-0.eTWZCm') == null){
            stop1 += 1;
            if(stop1 < 0){
                setTimeout(( () => keeptrying1() ), 20);
            }
        }else{
            document.querySelector('.emr523-0.eTWZCm').click();
        }
    }
    setTimeout(( () => keeptrying1() ), 0);
    var stop2 = -100;
    function keeptrying2() {
        if(document.querySelector('._1Hom0qN') == null){
            stop2 += 1;
            if(stop2 < 0){
                setTimeout(( () => keeptrying2() ), 20);
            }
        }else{
            document.querySelector('._1Hom0qN').click();
        }
    }
    setTimeout(( () => keeptrying2() ), 0);
    /*var stop3 = -100;
    function keeptrying3() {
        if(document.querySelector('.sc-1mz6e1e-1.QBVJO') == null){
            stop3 += 1;
            if(stop3 < 0){
                console.log(stop3);
                setTimeout(( () => keeptrying3() ), 20);
            }
        }else{
            var as = document.querySelectorAll('.sc-1mz6e1e-1.QBVJO a');
            var imgs = document.querySelectorAll('.sc-1mz6e1e-1.QBVJO a img');
            if(as.length != imgs.length){
                stop3 += 1;
                if(stop3 < 0){
                    console.log(stop3);
                    setTimeout(( () => keeptrying3() ), 20);
                }
            }else{
                for (var i = 0; i < as.length; ++i) {
                    imgs[i].src = as[i].getAttribute('href');
                    imgs[i].srcset = as[i].getAttribute('href');
                    imgs[i].removeAttribute("style");
                    imgs[i].setAttribute("style", "max-height: 100%;");
                    console.log("width = " + imgs[i].getAttribute('width'));
                    document.querySelector('.sc-1nr368f-6.ertGlR').setAttribute("style", "width:1000px;");
                };
            }
        }
    }
    setTimeout(( () => keeptrying3() ), 0);*/
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址