新页面打开种子详情页面

不能为空字符

目前為 2023-01-04 提交的版本,檢視 最新版本

// ==UserScript==
// @name         新页面打开种子详情页面
// @description  不能为空字符
// @namespace    http://tampermonkey.net/
// @version      0.1.4
// @author       imgreasy
// @match        https://ourbits.club/*
// @match        https://hdchina.org/*
// @match        https://totheglory.im/*
// @icon         https://raw.githubusercontent.com/zjutjh/NexusPHP/master/favicon.ico
// @license      MIT
// @grant        none
// @run-at       document-end
// @homepageURL  https://gf.qytechs.cn/zh-CN/scripts/457597
// ==/UserScript==

(function() {
    'use strict';
    switch(window.location.host) {
        case "totheglory.im":
            document.querySelector('#torrent_table').querySelectorAll('a').forEach(function (row) {
                if (row.href.indexOf('download') == -1) {
                    if (row.href.slice(0,4) == 'http' || row.href.slice(0,5) == 'https') {
                        row.target = '_blank'
                    }
                }
            });
            break;
        case "ourbits.club":
            document.querySelector('#torrenttable').querySelectorAll('a').forEach(function (row) {
                if (row.href.indexOf('download') == -1) {
                    if (row.href.slice(0,4) == 'http' || row.href.slice(0,5) == 'https') {
                        row.target = '_blank'
                    }
                }
            });
            break;
        case "hdchina.org":
            document.querySelector('#form_torrent').querySelectorAll('.torrent_list a').forEach(function (row) {
                if (row.href.indexOf('download') == -1) {
                    if (row.href.slice(0,4) == 'http' || row.href.slice(0,5) == 'https') {
                        row.target = '_blank'
                    }
                }
            });
            break;
        default:
            console.log("hi");
            break;
    }
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址