Change notification wording

Replace sentence-like wording from yt notifications with predictable, readable-at-a-glance text.

< Opiniones de Change notification wording

Puntuación: Bueno; el script funciona tal y como promete

§
Publicado: 12/6/2024
Editado: 12/6/2024

Works after a tweak. I recommend falling back to en-GB if a matching lang isn't found.

Basically replace

    let siteLang = document.getElementsByTagName("html")[0].getAttribute("lang");
    if (!(siteLang in langs)) { 
        console.error(`Language ${siteLang} is not supported.`);
        return;
    }

with this:

    let siteLang = document.getElementsByTagName("html")[0].getAttribute("lang");
    if (!(siteLang in langs)) {
        console.warn(`Language ${siteLang} is not supported, falling back to en-GB.`);
        siteLang = "en-GB";
    }
§
Publicado: 23/6/2024

I still really like this script. Sooo much easier on the eyes.

Publicar respuesta

Inicia sesión para responder.