Hide Bazaar Banners

Hides the annoying bazaar descriptions

当前为 2024-07-13 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Hide Bazaar Banners
  3. // @version 1.0
  4. // @description Hides the annoying bazaar descriptions
  5. // @author Weav3r [1853324]
  6. // @match https://www.torn.com/bazaar.php*
  7. // @run-at document-start
  8. // @namespace https://greasyfork.org/users/1132291
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. function removeElement() {
  15. const element = document.querySelector('.editor-content.segment___WhZ5E.noPadding___pvSVH .description___D99uc.unreset blockquote');
  16. if (element) {
  17. element.remove();
  18. }
  19. }
  20.  
  21. const observer = new MutationObserver((mutations) => {
  22. mutations.forEach(() => {
  23. removeElement();
  24. });
  25. });
  26.  
  27. observer.observe(document.documentElement, {
  28. childList: true,
  29. subtree: true
  30. });
  31.  
  32. removeElement();
  33. })();