Change notification wording

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

< Feedback on Change notification wording

Review: Good - script works

§
Posted: 2024/06/12
Edited: 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";
    }
§
Posted: 2024/06/23

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

Post reply

Sign in to post a reply.