GeoGuessr Ultimate Script

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

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

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name             GeoGuessr Ultimate Script
// @version          0.2
// @description      GeoGuessr Ultimate Script - One Script to rule them all - WORK IN PROGRESS
// @author           MrAmericanMike
// @include          /^(https?)?(\:)?(\/\/)?([^\/]*\.)?geoguessr\.com($|\/.*)/
// @grant            none
// @run-at           document-start
// @namespace        https://greasyfork.org/en/scripts/406060-geoguessr-ultimate-script
// ==/UserScript==

console.log("GeoGuessr Ultimate Script");

// MODULES // COMMENT OUT THE MODULES YOU DON'T NEEN BY ADDING '//' IN FRONT: EXAMPLE: //doRemoveRightBar();

// REMOVE BOTTOM WHITE BAR WHILE PLAYING A MAP
doRemoveBottomBar();

// REMOVE RIGHT WHITE BAR ON ROUND RESULTS SCREEN
doRemoveRightBar();







// NO NEED TO EDIT BELOW THIS LINE

function doRemoveBottomBar(){
	addGlobalStyle(`
    .game-layout__in-game-ad {
      display: none;
    }
	`);
}

function doRemoveRightBar(){
	addGlobalStyle(`
    .result__right {
      display: none;
    }
	`);
}


// GLOBAL STYLES INJECTOR
function addGlobalStyle(css) {
  let head;
  let style;
  head = document.getElementsByTagName('head')[0];
  if (!head) { return; }
  style = document.createElement('style');
  style.type = 'text/css';
  style.innerHTML = css.replace(/;/g, ' !important;');
  head.appendChild(style);
}