您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
AGSV Review
当前为
// ==UserScript== // @name AGSV Review Assistant // @namespace http://tampermonkey.net/ // @version 0.0.8 // @description AGSV Review // @author 7oomy // @match *://*.agsvpt.com/torrents.php?incldead=0&spstate=0&inclbookmarked=0&approval_status=0&size_begin=&size_end=&seeders_begin=&seeders_end=&leechers_begin=&leechers_end=×_completed_begin=×_completed_end=&added_begin=&added_end=&search=&search_area=0&search_mode=0 // @icon https://www.google.com/s2/favicons?sz=64&domain=agsvpt.com // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; var refresh_page = true; // 是否定时刷新页面 // 创建一个新的按钮元素 var button = document.createElement("button"); button.innerHTML = "打开种子"; button.id = "myButton"; button.style.position = "fixed"; button.style.width = "70px"; button.style.height = "30px"; button.style.background = "rgb(218, 230, 242)"; button.style.cursor = "pointer"; button.style.zIndex = "1"; button.style.top = "50%"; button.style.right = "8%"; button.style.borderRadius = "8px"; button.style.display = "block"; // 添加按钮的点击事件 button.addEventListener('click', function() { // 获取table元素 var table = document.querySelector('#outer > table.main > tbody > tr > td > table.torrents'); // 获取表格内的所有超链接 var links = table.getElementsByTagName('a'); // 创建一个正则表达式来匹配给定的链接格式,其中 $ 表示字符串的结尾 var regex = /details\.php\?id=\d+&hit=1$/; // 计数器,用于跟踪已找到的链接数 var count = 0; // 遍历链接 for (var i = 0; i < links.length; i++) { // 检查链接的href属性是否符合给定的模式 if (regex.test(links[i].href)) { console.log(links[i].href); // 输出链接 window.open(links[i].href, '_blank'); // 在新窗口中打开链接 count++; // 如果已找到五个链接,就停止循环 if (count >= 5) { break; } } } }); // 将新的按钮元素添加到body元素的末尾 document.body.appendChild(button); // 创建一个新的按钮元素 var refreshButton = document.createElement("button"); refreshButton.innerHTML = "刷新页面"; refreshButton.id = "myRefreshButton"; refreshButton.style.position = "fixed"; refreshButton.style.width = "70px"; refreshButton.style.height = "30px"; refreshButton.style.background = "rgb(218, 230, 242)"; refreshButton.style.cursor = "pointer"; refreshButton.style.zIndex = "1"; refreshButton.style.top = "43%"; refreshButton.style.right = "8%"; refreshButton.style.borderRadius = "8px"; refreshButton.style.display = "block"; // 添加按钮的点击事件 refreshButton.addEventListener('click', function() { localStorage.setItem('autoOpenSeed', true); location.reload(); }); // 将新的按钮元素添加到body元素的末尾 document.body.appendChild(refreshButton); // add a checkbox to control the auto-refresh let checkbox = document.createElement('input'); checkbox.type = 'checkbox'; checkbox.id = 'autoRefreshCheckbox'; checkbox.style.position = 'fixed'; checkbox.style.top = '40%'; checkbox.style.right = '8%'; // load the saved setting from localStorage checkbox.checked = localStorage.getItem('autoRefresh') === 'true'; // save the setting to localStorage whenever it changes checkbox.addEventListener('change', function() { localStorage.setItem('autoRefresh', this.checked); }); // add the container to the body document.body.appendChild(checkbox); function refreshPage() { if (localStorage.getItem('autoRefresh') === 'true') { location.reload(); } } setInterval(refreshPage, 15000); // 10000 milliseconds = 10 seconds if (localStorage.getItem('autoOpenSeed') === 'true') { localStorage.setItem('autoOpenSeed', false); var table = document.querySelector('#outer > table.main > tbody > tr > td > table.torrents'); // 获取表格内的所有超链接 var links = table.getElementsByTagName('a'); // 创建一个正则表达式来匹配给定的链接格式,其中 $ 表示字符串的结尾 var regex = /details\.php\?id=\d+&hit=1$/; // 计数器,用于跟踪已找到的链接数 var count = 0; // 遍历链接 for (var i = 0; i < links.length; i++) { // 检查链接的href属性是否符合给定的模式 if (regex.test(links[i].href)) { console.log(links[i].href); // 输出链接 window.open(links[i].href, '_blank'); // 在新窗口中打开链接 count++; // 如果已找到五个链接,就停止循环 if (count >= 5) { break; } } } } // if (localStorage.getItem('autoRefresh') === 'true') { // // 获取table元素 // var table = document.querySelector('#outer > table.main > tbody > tr > td > table.torrents'); // // 获取表格内的所有超链接 // var links = table.getElementsByTagName('a'); // // 创建一个正则表达式来匹配给定的链接格式,其中 $ 表示字符串的结尾 // var regex = /details\.php\?id=\d+&hit=1$/; // // 计数器,用于跟踪已找到的链接数 // var count = 0; // // 遍历链接 // for (var i = 0; i < links.length; i++) { // // 检查链接的href属性是否符合给定的模式 // if (regex.test(links[i].href)) { // console.log(links[i].href); // 输出链接 // window.open(links[i].href, '_blank'); // 在新窗口中打开链接 // count++; // // 如果已找到五个链接,就停止循环 // if (count >= 5) { // break; // } // } // } // } })();