Block WebAdvisor Logo

Blocks the WebAdvisor logo element on every site

  1. // ==UserScript==
  2. // @name Block WebAdvisor Logo
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.2
  5. // @description Blocks the WebAdvisor logo element on every site
  6. // @author Emree.el on instagram
  7. // @match *://*/*
  8. // @grant none
  9. // @license MIT
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. // Function to remove the WebAdvisor logo element
  16. function removeWebAdvisorLogo() {
  17. const webAdvisorLogo = document.querySelector('img[src^="chrome-extension://fheoggkfdfchfphceeifdbepaooicaho/images/web_advisor/logo.png"]');
  18. if (webAdvisorLogo) {
  19. webAdvisorLogo.remove();
  20. }
  21. }
  22.  
  23. // Use a MutationObserver to detect changes to the DOM
  24. const observer = new MutationObserver(() => {
  25. removeWebAdvisorLogo();
  26. });
  27.  
  28. // Observe changes in the entire document
  29. observer.observe(document.documentElement, { childList: true, subtree: true });
  30.  
  31. // Remove the WebAdvisor logo initially
  32. removeWebAdvisorLogo();
  33. })();