Geoguessr Blink Mode

Shows the round briefly, then screen goes black and you have unlimited time to make your guess.

08.04.2022 itibariyledir. En son verisyonu görün.

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         Geoguessr Blink Mode
// @description  Shows the round briefly, then screen goes black and you have unlimited time to make your guess.
// @version      0.1.2
// @author       macca#8949
// @license      MIT
// @include      https://www.geoguessr.com/*
// @run-at       document-start
// @grant        none
// @namespace    https://greatest.deepsurf.us/en/scripts/438579-geoguessr-blink-mode
// ==/UserScript==

const timeLimit = 1.5; // MODIFY THIS IF YOU WANT TO CHANGE THE TIME

async function checkElement(selector) {
    while (document.querySelector(selector) === null) {
        await new Promise(resolve => requestAnimationFrame(resolve));
    }
    return document.querySelector(selector);
}

function respondToVisibility(element, callback) {
    let options = {
        root: document.documentElement
    }

    let observer = new IntersectionObserver((entries, observer) => {
        entries.forEach(entry => {
            callback(entry.intersectionRatio > 0);
        });
    }, options);

    observer.observe(element);
}

checkElement('.widget-scene-canvas').then((canvas) => {
    respondToVisibility(canvas, visible => {
        setTimeout(() => {
            canvas.style.display = 'none';
        }, (timeLimit + 0.5) * 1000);
    });
});