NO ADS
当前为
// ==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);
})();