您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
在杏坛网站的每一行添加下载按钮,并在页面上添加一个下载所有种子的按钮
// ==UserScript== // @name 下载杏坛hr种 // @namespace http://tampermonkey.net/ // @version 0.2 // @description 在杏坛网站的每一行添加下载按钮,并在页面上添加一个下载所有种子的按钮 // @author xiaobaiya // @match https://xingtan.one/myhr.php* // @grant GM_openInTab // ==/UserScript== (function() { 'use strict'; // Function to add a download button to a specific row function addDownloadButton(row) { const detailsLink = row.querySelector('a[href^="details.php?id"]'); if (detailsLink) { const id = detailsLink.href.split('=')[1]; const downloadLink = `https://xingtan.one/download.php?id=${id}`; const downloadButton = document.createElement('input'); downloadButton.type = 'button'; downloadButton.value = '下载种子'; downloadButton.onclick = function() { GM_openInTab(downloadLink, true); }; row.querySelector('td:last-child').insertAdjacentElement('beforebegin', downloadButton); } } // Add download buttons to all rows document.querySelectorAll('#hr-table tbody tr').forEach(row => { addDownloadButton(row); }); // Add 'Download All' button next to the reset button const resetButton = document.querySelector('input[type="reset"]'); const downloadAllButton = document.createElement('input'); downloadAllButton.type = 'button'; downloadAllButton.value = '下载全部种子'; downloadAllButton.style.marginLeft = '10px'; downloadAllButton.onclick = function() { const links = Array.from(document.querySelectorAll('#hr-table a[href^="details.php?id"]')).map(link => `https://xingtan.one/download.php?id=${link.href.split('=')[1]}`); links.forEach((link, index) => { setTimeout(() => { GM_openInTab(link, true); }, 3000 * index); }); }; resetButton.parentNode.appendChild(downloadAllButton); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址