Pt-Page-DIY

hide the option buttons

目前為 2024-02-26 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Pt-Page-DIY
// @namespace    http://tampermonkey.net/
// @version      0.1.0
// @description  hide the option buttons
// @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/index.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';
        }
    }
})();