ImageHider

Hides any images in various ways.

  1. /* ==UserStyle==
  2. @name ImageHider
  3. @namespace sun/userstyles
  4. @version 1.2.9
  5. @description Hides any images in various ways.
  6. @compatible chrome
  7. @compatible edge
  8. @compatible firefox
  9. @compatible opera
  10. @compatible safari
  11. @homepageURL https://forgejo.sny.sh/sun/userstyles
  12. @supportURL https://forgejo.sny.sh/sun/userstyles/issues
  13. @contributionURL https://liberapay.com/sun
  14. @contributionAmount €1.00
  15. @author Sunny <sunny@sny.sh>
  16. @icon https://forgejo.sny.sh/sun/userstyles/raw/branch/main/icons/ImageHider.png
  17. @copyright 2020-present, Sunny (https://sny.sh/)
  18. @license Hippocratic License; https://forgejo.sny.sh/sun/userstyles/src/branch/main/LICENSE.md
  19. @preprocessor stylus
  20. @var select mode "Mode" ["d:Display", "v:Visibility*", "o:Opacity", "f:Opacity (filter)"]
  21. @var range opacity "Opacity" [0.25, 0, 1, 0.01]
  22. @var checkbox force "Force" 1
  23. ==/UserStyle== */
  24.  
  25. if force {
  26. img,
  27. canvas,
  28. picture,
  29. svg,
  30. video {
  31. if mode == d {
  32. display: none !important;
  33. }
  34. if mode == v {
  35. visibility: hidden !important;
  36. }
  37. if mode == o {
  38. opacity: opacity !important;
  39. }
  40. if mode == f {
  41. filter: opacity(opacity) !important;
  42. }
  43. }
  44. *,
  45. *:before,
  46. *:after {
  47. background-image: none !important;
  48. }
  49. }
  50. else {
  51. img,
  52. canvas,
  53. picture,
  54. svg,
  55. video {
  56. if mode == d {
  57. display: none;
  58. }
  59. if mode == v {
  60. visibility: hidden;
  61. }
  62. if mode == o {
  63. opacity: opacity;
  64. }
  65. if mode == f {
  66. filter: opacity(opacity);
  67. }
  68. }
  69. *,
  70. *:before,
  71. *:after {
  72. background-image: none;
  73. }
  74. }