press "P" to quit the game
// ==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();
}
});
});
})();