I often rely on jQuery purely for the $("document").ready function - which feels wrong.

In some cases, I really just want to run some small code when the page is ready. I’d like to do it in vanilla javascript, because these use cases are particularly well suited for vanilla.

Replace the document ready from jQuery with:

document.addEventListener("DOMContentLoaded", function() {
    // Your code to be executed here
});