JS aguarde a página para carregar
document.addEventListener("DOMContentLoaded", function(event) {
//do work
});
Xenophobic Xenomorph
document.addEventListener("DOMContentLoaded", function(event) {
//do work
});