GeoGuessr Duels Avatar Deleter

Deletes the ending animation screen with the avatars after a duel

  1. // ==UserScript==
  2. // @name GeoGuessr Duels Avatar Deleter
  3. // @description Deletes the ending animation screen with the avatars after a duel
  4. // @version 1.0
  5. // @author Tyow#3742
  6. // @match *://*.geoguessr.com/*
  7. // @grant none
  8. // @license MIT
  9. // @namespace https://greasyfork.org/users/1011193
  10. // ==/UserScript==
  11.  
  12. const checkGameMode = () => {
  13. return (location.pathname.startsWith("/duels/"));
  14. }
  15.  
  16. const checkState = () => {
  17. if (!checkGameMode()) { return; }
  18. const gameFinishedAvatarContainer = document.querySelector('.game-finished_avatarContainer__S63IS');
  19. const lobbyAvatarContainer = document.querySelector('.lobby_avatarContainer__kN2RK');
  20.  
  21. if(gameFinishedAvatarContainer) {
  22. gameFinishedAvatarContainer.remove()
  23. }
  24. if (lobbyAvatarContainer) {
  25. lobbyAvatarContainer.remove()
  26. }
  27. }
  28.  
  29. new MutationObserver(async (mutations) => {
  30. if (!checkGameMode()) { return; }
  31. checkState();
  32. }).observe(document.body, { subtree: true, childList: true });