easier-jpdb-labs

adds a link to the jpdb.io labs

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         easier-jpdb-labs
// @namespace    https://jpdb.io/
// @version      2.0
// @description  adds a link to the jpdb.io labs
// @author       Farami
// @match        https://jpdb.io/*
// @run-at       document-start
// @icon         https://www.google.com/s2/favicons?sz=64&domain=jpdb.io
// @grant        none
// @license      MIT
// ==/UserScript==

let running = true;
new MutationObserver(mutations => {
    'use strict';

    const settingsLink = document.querySelector(".nav-item[href='/settings']");
    if (running && settingsLink) {
        running = false;

        const link = document.createElement("a");
        link.classList.add("nav-item");
        link.href = "/labs";
        link.append("Labs");

        settingsLink.insertAdjacentElement("afterend", link);
    }
}).observe(document, { childList: true, subtree: true });