Greasy Fork is available in English.

sneedex tooltips

tooltips to tell you what the colors mean on sneedex.

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name     sneedex tooltips
// @version  1
// @grant    none
// @match https://*.sneedex.moe/*
// @description tooltips to tell you what the colors mean on sneedex.
// @namespace https://greasyfork.org/users/981420
// ==/UserScript==
var oldHref = document.location.href;

window.onload = function() {
    var bodyList = document.querySelector("body")
    var observer = new MutationObserver(function(mutations) {
        mutations.forEach(function(mutation) {
            if (oldHref != document.location.href) {
                oldHref = document.location.href;
                //console.log("CHANGED");
                for (const label of document.querySelectorAll("label")) {
                    switch (label.className) {
                        case "bad":
                            label.title = "Bad Encode";
                            break;
                        case "bain":
                            label.title = "Bad Encode and Incomplete";
                            break;
                        case "unmuxed":
                            label.title = "Unmuxed";
                            break;
                        case "unba":
                            label.title = "Bad Encode and Unmuxed";
                            break;
                        case "incomplete":
                            label.title = "Incomplete";
                            break;
                        case "unin":
                            label.title = "Unmuxed and Incomplete";
                            break;
                        default:
                            label.title = "Normal";
                            break;
                    }
                }
                console.log("done adding tooltips");
            }
        });
    });

    var config = {
        childList: true,
        subtree: true
    };

    observer.observe(bodyList, config);
};