nohiddenlobbies.arras.js

Expose hidden lobbies in the main menu

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo 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         nohiddenlobbies.arras.js
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  Expose hidden lobbies in the main menu
// @author       Eclipsia discord@cz_eclipsia
// @match        *://*.arras.io/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=arras.io
// @grant        none
// @license      MIT
// @run-at       document-start
// ==/UserScript==

(function() {
    'use strict';
    const windowFetch = window.fetch;
    
    window.fetch = async (req, options) => {
        const res = await windowFetch(req, options);

        if (res.url.endsWith("/status")) {
            const json = await (res.clone().json());
            for (const key of Object.keys(json.status)) {
                json.status[key].hidden = false;
            }
            res.json = async () => json;
        }
        return res;
    };
})();