Remove media

Remove images and videos

  1. // ==UserScript==
  2. // @name Remove media
  3. // @namespace Filters
  4. // @description Remove images and videos
  5. // @version 2025-04-17
  6. // @author Elvin Aslanov
  7. // @icon https://www.google.com/s2/favicons?sz=64&domain=wikimedia.org
  8. // @grant none
  9. // @run-at document-idle
  10. // @match *://*/*
  11. // ==/UserScript==
  12.  
  13.  
  14. /* eslint no-return-assign: off */
  15.  
  16.  
  17. document
  18. . querySelectorAll ( 'img, video, figure, svg' )
  19. . forEach ( element => element . remove () );
  20.  
  21. document
  22. . querySelectorAll ('*')
  23. . forEach ( element => element.style.setProperty ( 'background-image', 'none', 'important' ) );