Change notification wording

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

< Commentaires sur Change notification wording

Avis: Bon - le script fonctionne correctement

§
Posté le: 2024-06-12
Édité le: 2024-06-12

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";
    }
§
Posté le: 2024-06-23

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

Poster une réponse

Connectez-vous pour poster une réponse.