exit quietly if typo container not present

This commit is contained in:
John Bowdre 2024-08-04 15:22:22 -05:00
parent af569eaadf
commit e9386060c0

View file

@ -8,8 +8,10 @@
// implement typo
document.addEventListener('DOMContentLoaded', function() {
let typoElement = document.getElementById('typo');
if (typoElement) {
let typoText = "I write code to make imaginary computers run code written by less imaginary developers";
typo(typoElement, typoText);
}
});
</script>
<script src="https://res.jbowdre.lol/js/weather.js" defer></script>
@ -27,8 +29,6 @@ document.addEventListener('DOMContentLoaded', function() {
});
});
observer.observe(themeSongContainer, { childList: true });
} else {
console.log("No music container here.");
}
});
</script>