GeoGuessr Custom Map Sizes

Enables the user to customize the size of the map for GeoGuessr // Edit the rem values for each map size to fit your needs // If you can't click the "Increase button" the Game already thinks you are at the max-height it can go // If you want to always have a big map edit the values for 'size-1' as that is the default one that triggers when starting a new game // Play with different values until you happy // Some sizes like the auto-shrink height are fixed I believe

  1. // ==UserScript==
  2. // @name GeoGuessr Custom Map Sizes
  3. // @namespace https://greasyfork.org/en/users/250979-mrmike
  4. // @version 0.2.2
  5. // @description Enables the user to customize the size of the map for GeoGuessr // Edit the rem values for each map size to fit your needs // If you can't click the "Increase button" the Game already thinks you are at the max-height it can go // If you want to always have a big map edit the values for 'size-1' as that is the default one that triggers when starting a new game // Play with different values until you happy // Some sizes like the auto-shrink height are fixed I believe
  6. // @author MrAmericanMike
  7. // @include /^(https?)?(\:)?(\/\/)?([^\/]*\.)?geoguessr\.com($|\/.*)/
  8. // @grant none
  9. // @run-at document-start
  10. // ==/UserScript==
  11.  
  12. function addGlobalStyle(css) {
  13. var head, style;
  14. head = document.getElementsByTagName('head')[0];
  15. if (!head) { return; }
  16. style = document.createElement('style');
  17. style.type = 'text/css';
  18. style.innerHTML = css.replace(/;/g, ' !important;');
  19. head.appendChild(style);
  20. }
  21.  
  22. addGlobalStyle (`
  23.  
  24. /* Map at size 0 and active (Hoover) */
  25. .guess-map--size-0 {
  26. --active-width: 20rem;
  27. --active-height: 20rem;
  28. }
  29.  
  30. /* Map at size 1 and active (Hoover) */
  31. .guess-map--size-1 {
  32. --active-width: 40rem;
  33. --active-height: 26rem;
  34. }
  35.  
  36. /* Map at size 2 and active (Hoover) */
  37. .guess-map--size-2 {
  38. --active-width: 50rem;
  39. --active-height: 30rem;
  40. }
  41.  
  42. /* Map at size 3 and active (Hoover) */
  43. .guess-map--size-3 {
  44. --active-width: 60rem;
  45. --active-height: 40rem;
  46. }
  47.  
  48. /* Map at size 4 and active (Hoover) */
  49. .guess-map--size-4 {
  50. --active-width: 70rem;
  51. --active-height: 50rem;
  52. }
  53.  
  54.  
  55. .guess-map {
  56. margin: 0px;
  57. --inactive-width: 10rem;
  58. --inactive-height: 10rem;
  59. }
  60.  
  61. `);