您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Manga downloader for mangagun.com
当前为
// ==UserScript== // @name MangagunDownloader // @namespace https://github.com/Timesient/manga-download-scripts // @version 0.5 // @license GPL-3.0 // @author Timesient // @description Manga downloader for mangagun.com // @icon https://mangagun.com/favicon.ico // @homepageURL https://gf.qytechs.cn/zh-CN/scripts/453154-mangagundownloader // @supportURL https://github.com/Timesient/manga-download-scripts/issues // @match https://mangagun.com/read-* // @require https://unpkg.com/[email protected]/dist/axios.min.js // @require https://unpkg.com/[email protected]/dist/jszip.min.js // @require https://unpkg.com/[email protected]/dist/FileSaver.min.js // @require https://gf.qytechs.cn/scripts/451810-imagedownloaderlib/code/ImageDownloaderLib.js?version=1129512 // @grant GM_xmlhttpRequest // @grant GM_info // ==/UserScript== (async function(axios, JSZip, saveAs, ImageDownloader) { 'use strict'; // get title const title = window.location.pathname.replace('/read-', '').replace('.html', ''); // get image urls const imageURLs = await new Promise(resolve => { const timer = setInterval(() => { const urls = []; document.querySelectorAll('img.chapter-img').forEach(img => urls.push(img.dataset.src)); if(urls.length) { console.log(urls); resolve(urls); clearInterval(timer); } }, 500); }); // setup ImageDownloader ImageDownloader.init({ maxImageAmount: imageURLs.length, getImagePromises, title }); // collect promises of image function getImagePromises(startNum, endNum) { return imageURLs .slice(startNum - 1, endNum) .map(url => getImage(url) .then(ImageDownloader.fulfillHandler) .catch(ImageDownloader.rejectHandler) ); } // get promise of image function getImage(url) { return new Promise(resolve => { GM_xmlhttpRequest({ method: 'GET', url, responseType: 'arraybuffer', onload: res => resolve(res.response) }); }); } })(axios, JSZip, saveAs, ImageDownloader);
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址