-1
I’m developing an extension (just for me for now) for Microsoft Edge Chromium that changes the Github source, but it doesn’t change when I reset the page cache, here’s the script I made (it’s just it and nothing else), it works perfectly, the only thing is that it does not perform sometimes:
window.onload = function()
{
    let blob_num = document.getElementsByClassName('blob-num');
    for (let i = 0; i < blob_num.length; ++i)
        blob_num.item(i).style.fontFamily = "Cascadia Mono";
        
    let blob_code_inner = document.getElementsByClassName("blob-code-inner");
    for (let i = 0; i < blob_code_inner.length; ++i)
    {
        let blob_code_inner_style = blob_code_inner.item(i).style;
        
        blob_code_inner_style.fontFamily = "Cascadia Mono";
        blob_code_inner_style.fontSize = "11px";
    }
}
For those who didn’t understand, here’s the thing, I log into some file on Github, and the script runs normally, but if I press Ctrl + R to reset the cache and reload the page, or log into some page I’ve never logged into before on Github, the script doesn’t run, I’ve tried a few things besides the property window.onload, such as the document.addEventListener("DOMContentLoad", ...); and some others that I don’t remember at the moment, but which also didn’t work :/
How do I make it work? I’m not good at JS, but I hope I’ve been clear enough
I’m running it in an extension that I created for Edge, it’s pretty simple, and I’ll take a look at these script managers that you said, obg
– Luiz Fernando
Thank you so much, I did it and it worked :)
– Luiz Fernando