您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
在webUI的右键菜单中增加批量复制字段的功能,可直接粘贴到excel
// ==UserScript== // @name 为 qBittorrent 的tracker列表增加筛选 // @name:en add tracker list filter for qBitorrent webUI // @namespace localhost // @version 0.2 // @description 在webUI的右键菜单中增加批量复制字段的功能,可直接粘贴到excel // @description:en add a contextmenu item to batch copy torrent information in order to pasting to Excel // @author flashlab // @match http://127.0.0.1:8080/ // @icon https://www.qbittorrent.org/favicon.ico // @license MIT // @run-at document-end // ==/UserScript== (function() { 'use strict'; const newItem = `<input id="trackersFilterInput" type="text" placeholder="过滤 tracker 列表..." autocomplete="off" autocorrect="off" autocapitalize="none" style=" background-image: url(../images/trackers.svg); background-repeat: no-repeat; background-size: 1.3em; padding: 0 0 0 1.5em; width: 120px; margin: 0.2em; font-size: 13px;">` window.addEventListener('load', function () { function waitForElm(selector) { return new Promise(resolve => { if (document.querySelector(selector)) { return resolve(document.querySelector(selector)); } const observer = new MutationObserver(mutations => { if (document.querySelector(selector)) { observer.disconnect(); resolve(document.querySelector(selector)); } }); observer.observe(document.querySelector('#Filters'), { childList: true, subtree: true }); }); } waitForElm('#trackerFilterList>li>a>img').then((el) => { const trackerlist = document.getElementById('trackerFilterList'); if (!trackerlist) return; const lists = trackerlist.children if (lists.length == 0) return; trackerlist.insertAdjacentHTML('beforebegin', newItem) const filterInput = document.getElementById('trackersFilterInput'); filterInput.style.backgroundImage = `url(${lists[0].querySelector('img').src})`; function reset() { Array.from(trackerlist.querySelectorAll('li.invisible')).forEach( (el) => el.classList.remove('invisible') ); } filterInput.addEventListener('keyup', function (e) { const key = new RegExp(e.target.value, 'gi'); if( e.target.value.length < 2) return reset(); Array.from(lists).slice(1).forEach( (el) => el.classList.toggle('invisible', !el.innerText.match(key)) ) }) }) }) })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址