ImageHider

Hides any images in various ways.

2022-07-15 يوللانغان نەشرى. ئەڭ يېڭى نەشرىنى كۆرۈش.

/* ==UserStyle==
@name               ImageHider
@namespace          TheLastZombie/userstyles
@version            1.2.2
@description        Hides any images in various ways.
@compatible         chrome
@compatible         edge
@compatible         firefox
@compatible         opera
@compatible         safari
@homepageURL        https://codeberg.org/sun/userstyles
@supportURL         https://codeberg.org/sun/userstyles/issues/new
@contributionURL    https://ko-fi.com/rcrsch
@contributionAmount €1.00
@author             TheLastZombie <roesch.eric+userstyles@protonmail.com>
@icon               https://codeberg.org/sun/userstyles/raw/branch/main/icons/ImageHider.png
@copyright          2020-2022, TheLastZombie (https://eric.jetzt/)
@license            MIT; https://codeberg.org/sun/userstyles/src/branch/main/LICENSE
@preprocessor       stylus
@var                select   mode    "Mode"    ["d:Display", "v:Visibility*", "o:Opacity", "f:Opacity (filter)"]
@var                range    opacity "Opacity" [0.25, 0, 1, 0.01]
@var                checkbox force   "Force"   1
==/UserStyle== */

if force {
  img,
  canvas,
  picture,
  svg,
  video {
    if mode == d {
      display: none !important;
    }
    if mode == v {
      visibility: hidden !important;
    }
    if mode == o {
      opacity: opacity !important;
    }
    if mode == f {
      filter: opacity(opacity) !important;
    }
  }
  *,
  *:before,
  *:after {
    background-image: none !important;
  }
}
else {
  img,
  canvas,
  picture,
  svg,
  video {
    if mode == d {
      display: none;
    }
    if mode == v {
      visibility: hidden;
    }
    if mode == o {
      opacity: opacity;
    }
    if mode == f {
      filter: opacity(opacity);
    }
  }
  *,
  *:before,
  *:after {
    background-image: none;
  }
}