您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Скачивает Все главы со страницы манги на MangaLib.me
// ==UserScript== // @name MangaLibDownload // @version 1.1 // @description Скачивает Все главы со страницы манги на MangaLib.me // @author Ivanchenko. D. // @match https://mangalib.me/* // @license MIT // @grant none // @namespace https://greasyfork.org/users/934023 // ==/UserScript== (function() { 'use strict'; var header = document.querySelector('#main-page .media-tabs .tabs__list'); if (header != undefined) { const button = document.createElement('span'); var timer = null, px = 30, list = []; button.classList.add('volume-anchor__trigger'); button.innerText = 'Скачать все главы'; button.style.marginLeft = '12px'; header.append(button); button.addEventListener('click', function() { timer = setInterval(function(){ window.scrollTo(0,px); const chapters = document.querySelectorAll('.media-chapter'); chapters.forEach(function(node) { var id = node.getAttribute('data-id'), element = list.find(function(value, index) {return value === id;}); if (element == undefined) { list.push(id); node.querySelector('.media-chapter__icon_download').click(); } }); px+=300; }, 500); }); window.onscroll = function(e){ if ((window.innerHeight + window.scrollY) >= document.body.offsetHeight) { clearInterval(timer); console.log(list); } } } })();