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 // Don't forget to save the script and refresh the page after each change //

当前为 2020-02-17 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name GeoGuessr Custom Map Sizes
  3. // @namespace https://greasyfork.org/en/users/250979-mrmike
  4. // @version 0.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 // Don't forget to save the script and refresh the page after each change //
  6. // @author MrAmericanMike
  7. // @include /^(https?)?(\:)?(\/\/)?([^\/]*\.)?geoguessr\.com($|\/.*)/
  8. // @grant none
  9. // @run-at document-start
  10. // ==/UserScript==
  11.  
  12. console.log("Runing");
  13.  
  14. function addGlobalStyle(css) {
  15. var head, style;
  16. head = document.getElementsByTagName('head')[0];
  17. if (!head) { return; }
  18. style = document.createElement('style');
  19. style.type = 'text/css';
  20. style.innerHTML = css.replace(/;/g, ' !important;');
  21. head.appendChild(style);
  22. }
  23.  
  24.  
  25. addGlobalStyle (`
  26.  
  27. /* Map at size 0 and active (Hoover) */
  28. .guess-map--size-0{
  29. --active-width: 20rem;
  30. --active-height: 20rem;
  31. }
  32.  
  33. /* Map at size 1 and active (Hoover) */
  34. .guess-map--size-1{
  35. --active-width: 40rem;
  36. --active-height: 26rem;
  37. }
  38.  
  39. /* Map at size 2 and active (Hoover) */
  40. .guess-map--size-2{
  41. --active-width: 50rem;
  42. --active-height: 30rem;
  43. }
  44.  
  45. /* Map at size 3 and active (Hoover) */
  46. .guess-map--size-3{
  47. --active-width: 60rem;
  48. --active-height: 40rem;
  49. }
  50.  
  51. /* Map at size 4 and active (Hoover) */
  52. .guess-map--size-4{
  53. --active-width: 70rem;
  54. --active-height: 50rem;
  55. }
  56.  
  57.  
  58. .guess-map{
  59. margin: 0px;
  60. --inactive-width: 10rem;
  61. --inactive-height: 10rem;
  62. }
  63.  
  64. `);