Greasy Fork

Greasy Fork is available in English.

图集岛VIP

破解图集岛VIP

当前为 2022-02-13 提交的版本,查看 最新版本

// ==UserScript==
// @name         图集岛VIP
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  破解图集岛VIP
// @author       sellry
// @match        *://*.tujidao.com/*
// @grant        none
// @license      GPLv3
// ==/UserScript==

(function() {
    'use strict';
    [].forEach.call( document.querySelectorAll('div.hezi>ul>li'),imgLiTag=>{
        imgLiTag.querySelector('a').removeAttribute("href");
        imgLiTag.style.cursor='pointer';
        imgLiTag.addEventListener('click',function(){
            const html = Array(parseInt(imgLiTag.querySelector('span.shuliang').innerText.replace('P',''))).fill(0).map((item,num)=>{
                const imgurl = `https:///tjg.gzhuibei.com/a/1/${imgLiTag.id}/${num+1}.jpg`
                return `<a href='${imgurl}'> <img alt="" src='${imgurl}'></a>`
            }).join('');
            layui.use('layer', function(){
                var layer = layui.layer;
                layer.open({
                    type:1,
                    area: ['1000px', '500px'],
                    maxmin: true,
                    offset: '0',
                    title: imgLiTag.querySelector('p.biaoti>a').innerText,
                    content: `<style>.testBody{width: 100%;margin:0 auto;columns:4;column-gap: 10px; overflow:auto} .testBody a {display:block;width: 100%;break-inside: avoid;margin-bottom: 10px;} .testBody a img {width: 100%;}</style><body bgcolor="#27282d"><div class="testBody">${html}</div>`
                });
            });
        });
    })
})();