Survev.io RageQuit

press "P" to quit the game

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name         Survev.io RageQuit
// @namespace    http://tampermonkey.net/
// @license      MIT
// @version      0.4
// @description  press "P" to quit the game
// @author       notKaiAnderson, edited by Asultra
// @match        *://survev.io/*
// @match        *://zurviv.io/*
// @icon         https://images-ext-1.discordapp.net/external/rVvRC4_qOpmTS5sLOlcqMg-7O-qZ3aQBQOFr_nZ36_Y/https/i.ibb.co/rftwX4HQ/image-png-1.png
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    let cycle = (x) => (x == false) ? undefined : x == undefined;
    let cycle2 = (x, y, z) => x == y ? z : y;
    const keys = ["p"];
    const disableKey = key => keys.push(key);
    ["keypress", "keydown", "keyup"].forEach(type => {
        document.addEventListener(type, e => {
            if (keys.indexOf(e.key) !== -1) {
                if (e.type == "keydown") {
                    if (e.key == "p") {
document.getElementById('btn-game-quit').click()
                }
                }
                return e.preventDefault();
            }
        });
    });
})();