(function() { 'use strict'; var html1='img_title'+ ''+ '
'; var html2='
'; var pic_base = "
{tags} {imgnum}
"; console.log("start"); var createnew = function(num, pic_id,tags){ var pic_new = pic_base.replace('{pic_id}',pic_id); var tagHtml = []; var last = tags.pop(); for(let t of tags){ tagHtml.push(t.outerHTML); } tagHtml.push(last.innerText);
var imgs=[]; for(var i = 1; i <= num; i++){ imgs.push(pic_new.replace('{num}',i).replace('{imgnum}',` [${i}/${num}]`).replace('{tags}',tagHtml.join(' / '))); } let html = html1.replace('img_title',`${num}P @ ${pic_id}`); html += imgs.join('\n'); html += html2; var w=window.open('about:blank'); w.document.write(html); w.document.close();
} // 小图链接 var liImages = document.querySelectorAll('div.hezi>ul>li>a')
for (const img of liImages) { //第一个a img.onclick = function (){ var _parentNode = img.parentNode; // 获取数量 var num = _parentNode.querySelector('span.shuliang').innerText.split("P")[0] num = parseInt(num); // id var id = img.getAttribute("href"); id = id.split("id=")[1]; //丢掉最后一个 var tags = _parentNode.querySelectorAll('p>a'); console.log(id); createnew(num, id,[...tags]); } } })();
大图撑出去的问题,我的锅,看图太激动了,css写错了。大家更新一下,辛苦作者更新一下 @yyg
'; ';{tags} {imgnum} ";
// ==UserScript==
// @name 图集岛破解VIP
// @namespace http://tampermonkey.net/
// @version 1.1
// @description 破解图集岛vip
// @author yyg
// @match *://*.tujidao.com/*
// @grant none
// @date 2021-09-13
// ==/UserScript==
(function() {
'use strict';
var html1='img_title'+
''+
'
var html2='
var pic_base = "
console.log("start");
var createnew = function(num, pic_id,tags){
var pic_new = pic_base.replace('{pic_id}',pic_id);
var tagHtml = [];
var last = tags.pop();
for(let t of tags){
tagHtml.push(t.outerHTML);
}
tagHtml.push(last.innerText);
var imgs=[];
for(var i = 1; i <= num; i++){
imgs.push(pic_new.replace('{num}',i).replace('{imgnum}',` [${i}/${num}]`).replace('{tags}',tagHtml.join(' / ')));
}
let html = html1.replace('img_title',`${num}P @ ${pic_id}`);
html += imgs.join('\n');
html += html2;
var w=window.open('about:blank');
w.document.write(html);
w.document.close();
}
// 小图链接
var liImages = document.querySelectorAll('div.hezi>ul>li>a')
for (const img of liImages) {
//第一个a
img.onclick = function (){
var _parentNode = img.parentNode;
// 获取数量
var num = _parentNode.querySelector('span.shuliang').innerText.split("P")[0]
num = parseInt(num);
// id
var id = img.getAttribute("href");
id = id.split("id=")[1];
//丢掉最后一个
var tags = _parentNode.querySelectorAll('p>a');
console.log(id);
createnew(num, id,[...tags]);
}
}
})();