您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Improve setnmh
// ==UserScript== // @name Setnmh helper // @namespace http://tampermonkey.net/ // @version 0.1 // @description Improve setnmh // @author You // @match https://www.setnmh.com/series-* // @icon https://www.google.com/s2/favicons?sz=64&domain=setnmh.com // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; var iframe; const container = document.querySelector('.ptview'); function processImage(image) { console.log('processImage', image); const img = document.createElement('img'); img.src = image; container.appendChild(img); console.log(img); } function processPage(page) { console.log('processPage', page); if (!iframe) { iframe = document.createElement('iframe'); iframe.style.position = 'absolute'; iframe.style.width = '0px'; iframe.style.height = '0px'; document.body.appendChild(iframe); } iframe.src = page; showLoading(page); } const nextPageA = document.querySelector('.setnmh-next.mhicon.icon-jiantou-right'); if (window.parent != window.top) { const interval = setInterval(() => { const img = document.querySelector('.setnmh-seebox img'); if (!img) return; clearInterval(interval); window.top.postMessage({ nextPagePath: nextPageA?.href, image: img.src }, location.origin); }, 100); return; } window.addEventListener('message', e => { if (e.data.image) { processImage(event.data.image); } if (e.data.nextPagePath) { processPage(e.data.nextPagePath); } }); if (nextPageA) processPage(nextPageA.href); })();