Remove Maprunner Avatar and Background

Remove Maprunner Avatar and Background from the webpage

  1. // ==UserScript==
  2. // @name Remove Maprunner Avatar and Background
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description Remove Maprunner Avatar and Background from the webpage
  6. // @author TheM1sty
  7. // @match www.geoguessr.com/*
  8. // @grant none
  9. // @icon https://www.google.com/s2/favicons?domain=geoguessr.com
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. // Function to remove the specified HTML element
  17. function removeElement(element) {
  18. if (element && element.parentNode) {
  19. element.parentNode.removeChild(element);
  20. }
  21. }
  22.  
  23. // Find and remove the avatar element
  24. const avatarElement = document.querySelector('.maprunner-start-page_avatarWrapper__sQsZv');
  25. if (avatarElement) {
  26. removeElement(avatarElement);
  27. }
  28.  
  29. // Find and remove the background element
  30. const backgroundElement = document.querySelector('.maprunner-signed-in-start-page_backgroundWrapper__LOeXW');
  31. if (backgroundElement) {
  32. removeElement(backgroundElement);
  33. }
  34. })();