Pt-Page-DIY

自定义PT页面

当前为 2024-02-26 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Pt-Page-DIY
// @namespace    http://tampermonkey.net/
// @version      0.1.2
// @description  自定义PT页面
// @author       7ommy
// @match        *://*.agsvpt.com/*
// @match        *://*.pterclub.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=agsvpt.com
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';
    // 是否屏蔽AGSV悬浮按钮
    var hide_agsv_float_btn = 1;
    // 是否屏蔽AGSV热门/经典页
    var hide_agsv_recommend = 1;
    // 是否屏蔽猫站悬浮按钮
    var hide_pter_float_btn = 1;

    if(hide_agsv_float_btn){
        var element = document.querySelector('.circle-container');
        if(element){
            element.style.display = 'none';
        }
    }

    if(hide_agsv_recommend && window.location.href.includes("agsvpt.com/torrents.php")){
        var element1 = document.querySelector('#outer > table.main > tbody > tr > td > h2:nth-child(1)');
        if(element1){
            element1.style.display = 'none';
        }

        var element2 = document.querySelector('#outer > table.main > tbody > tr > td > table:nth-child(2)');
        if(element2){
            element2.style.display = 'none';
        }

        var element3 = document.querySelector('#outer > table.main > tbody > tr > td > h2:nth-child(3)');
        if(element3){
            element3.style.display = 'none';
        }

        var element4 = document.querySelector('#outer > table.main > tbody > tr > td > table:nth-child(4)');
        if(element4){
            element4.style.display = 'none';
        }
    }

    if(hide_pter_float_btn){
        var element_pter = document.querySelector('#aside-nav');
        if(element_pter){
            element_pter.style.display = 'none';
        }
    }
})();