Custom Element Hider

Allows you to specify a list of custom css selectors for hiding certain elements on specific websites, similar to a custom filter of an adblocker. Matching is done with the full hostname, subdomain included.

Ekde 2025/10/25. Vidu La ĝisdata versio.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Custom Element Hider
// @description  Allows you to specify a list of custom css selectors for hiding certain elements on specific websites, similar to a custom filter of an adblocker. Matching is done with the full hostname, subdomain included.
// @version      1.1.1
// @namespace    https://github.com/Fenn3c401
// @author       Fenn3c401
// @license      GPL-3.0-or-later
// @icon         data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAwIiBoZWlnaHQ9IjgwMCIgdmlld0JveD0iOTAuODggNjcuODQgODQ0LjggODQ0LjgiIGNsYXNzPSJpY29uIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik01MTMuMjggODAuNjRjLTIyNi41NiAwLTQwOS42IDE4My4wNC00MDkuNiA0MDkuNnMxODMuMDQgNDA5LjYgNDA5LjYgNDA5LjYgNDA5LjYtMTgzLjA0IDQwOS42LTQwOS42LTE4NC4zMi00MDkuNi00MDkuNi00MDkuNm0wIDE1My42YzQ3LjM2IDAgOTIuMTYgMTIuOCAxMjkuMjggMzUuODRMMjkzLjEyIDYxOS41MmMtMjMuMDQtMzguNC0zNS44NC04MS45Mi0zNS44NC0xMjkuMjggMC0xNDAuOCAxMTMuOTItMjU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YuNC0yNC4zMi00MC45Ni0zNy4xMi04OC4zMi0zNy4xMi0xMzYuOTYgMC0xNDguNDggMTIwLjMyLTI2OC44IDI2OC44LTI2OC44IDQ3LjM2IDAgOTQuNzIgMTIuOCAxMzYuOTYgMzcuMTIgMy44NCAyLjU2IDUuMTIgNS4xMiA2LjQgOC45NnMtMS4yOCA3LjY4LTMuODQgMTAuMjRsLTM1MiAzNTJjLTIuNTYgMi41Ni02LjQgMy44NC04Ljk2IDMuODRtMjIwLjE2LTM4NS4yOGMtMTM0LjQgMC0yNDMuMiAxMDguOC0yNDMuMiAyNDMuMiAwIDM3LjEyIDguOTYgNzUuNTIgMjUuNiAxMDguOGwzMjYuNC0zMjYuNGMtMzQuNTYtMTYuNjQtNzEuNjgtMjUuNi0xMDguOC0yNS42IiBmaWxsPSIjMjMxQzFDIi8+PC9zdmc+
// @match        *://*/*
// @run-at       document-start
// @grant        GM_addStyle
// ==/UserScript==

/* README
> Inspired by Zach Saucier's [Custom element hider](https://greasyfork.org/scripts/30410) userscript.
*/


'use strict';

const blacklist = {
  'trakt.tv': [
    '.action-buttons .btn-checkin',
    '#sentiment',
    '.sentiments-wrapper',
    '.sidebar :is(#external-link-twitter, #external-link-facebook)',
  ],
  'ext.to': [
    '.vide-watch-btn',
    '#tab-detail > li:has(a[href$="/watch/"], a[href^="https://webtor.io"])',
    'body > div:not(:has(*))',
  ],
};


const selectors = blacklist[location.hostname];
if (!selectors) return;

GM_addStyle(`
  ${selectors.join()} {
    display: none !important;
  }
`);