HotPot.ai NO ADS

NO ADS

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

// ==UserScript==
// @name            HotPot.ai NO ADS
// @namespace       Wizzergod
// @version         1.0.3
// @description     NO ADS
// @icon            https://www.google.com/s2/favicons?sz=64&domain=hotpot.ai
// @license         MIT
// @author          Wizzergod
// @match           *://hotpot.ai/*
// ==/UserScript==

(function() {
    'use strict';

    // Массив с селекторами элементов для скрытия
    var selectorsToHide = [
        'article.internalAdBox',
        'article:nth-of-type(1)',
        'article:nth-of-type(2)',
        'article:nth-of-type(3)',
        'article:nth-of-type(4)',
        'article:nth-of-type(5)',
        'article:nth-of-type(6)',
        'article:nth-of-type(7)',
        'article:nth-of-type(8)',
        'article:nth-of-type(9)',
        '#headerBox',
        '#rootGallery',
        '#apiAccess',
        '#rootFooter',
        '#disabled',
        '.disabled',
        '.topAdBox',
        '#.topAdBox',
        '.artMakerAdBox',
        '#artMakerAdBox',
        '#cookieOverlay',
        '#faq'
    ];

    function addHideStyles() {
        var style = document.createElement('style');
        style.type = 'text/css';
        style.innerHTML = selectorsToHide.join(',') + '{ display: none !important; }';
        document.head.insertBefore(style, document.head.firstChild);
    }

    addHideStyles();

    // Функция для скрытия элементов
    function hideElements() {
        selectorsToHide.forEach(function(selector) {
            var elements = document.querySelectorAll(selector);
            elements.forEach(function(element) {
                element.style.display = 'none';
            });
        });
    }

    // Запуск функции при загрузке страницы
    window.addEventListener('load', hideElements);

})();

QingJ © 2025

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