pixiv.cat极简辅助

当pixiv.cat因为图片个数而无法显示时可通过此脚本在新标签页打开所有图片

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         pixiv.cat极简辅助
// @namespace    https://pixiv.cat/
// @version      0.4
// @description  当pixiv.cat因为图片个数而无法显示时可通过此脚本在新标签页打开所有图片
// @author       Pikaqian
// @match        https://pixiv.cat/*
// @icon         https://pixiv.cat/favicon.ico
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    var body = document.getElementsByTagName ("p")[0];
    var inner=body.innerHTML
    //var result=inner.match(i)
    const match_number=/[0-9]*[0-9]/
    var result_1=inner.match(match_number)
    console.log(result_1[0])
    var picture=result_1[0]
    if(picture>=15){
    picture=15
    }
    var url=window.location.href
    var url_1=url.split(".png")
    for(var t=picture;t>0;t--){
        var url_final=url_1[0]+"-"+t+".png"
        window.open(url_final)
    console.log(url_final)
    }

    window.opener = null
    window.open('','_self')
    window.close()
})();