GeoGuessr Ultimate Script

GeoGuessr Ultimate Script - One Script to rule them all - WORK IN PROGRESS

目前為 2020-06-25 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name GeoGuessr Ultimate Script
  3. // @version 0.2
  4. // @description GeoGuessr Ultimate Script - One Script to rule them all - WORK IN PROGRESS
  5. // @author MrAmericanMike
  6. // @include /^(https?)?(\:)?(\/\/)?([^\/]*\.)?geoguessr\.com($|\/.*)/
  7. // @grant none
  8. // @run-at document-start
  9. // @namespace https://greasyfork.org/en/scripts/406060-geoguessr-ultimate-script
  10. // ==/UserScript==
  11.  
  12. console.log("GeoGuessr Ultimate Script");
  13.  
  14. // MODULES // COMMENT OUT THE MODULES YOU DON'T NEEN BY ADDING '//' IN FRONT: EXAMPLE: //doRemoveRightBar();
  15.  
  16. // REMOVE BOTTOM WHITE BAR WHILE PLAYING A MAP
  17. doRemoveBottomBar();
  18.  
  19. // REMOVE RIGHT WHITE BAR ON ROUND RESULTS SCREEN
  20. doRemoveRightBar();
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28. // NO NEED TO EDIT BELOW THIS LINE
  29.  
  30. function doRemoveBottomBar(){
  31. addGlobalStyle(`
  32. .game-layout__in-game-ad {
  33. display: none;
  34. }
  35. `);
  36. }
  37.  
  38. function doRemoveRightBar(){
  39. addGlobalStyle(`
  40. .result__right {
  41. display: none;
  42. }
  43. `);
  44. }
  45.  
  46.  
  47. // GLOBAL STYLES INJECTOR
  48. function addGlobalStyle(css) {
  49. let head;
  50. let style;
  51. head = document.getElementsByTagName('head')[0];
  52. if (!head) { return; }
  53. style = document.createElement('style');
  54. style.type = 'text/css';
  55. style.innerHTML = css.replace(/;/g, ' !important;');
  56. head.appendChild(style);
  57. }