let readyStateChange-listener run only one

This commit is contained in:
ItsVipra 2023-07-10 16:09:00 +02:00
parent e579c21337
commit ebef128de4

View file

@ -39,7 +39,7 @@ async function checkSite() {
if (response) {
// debug('checksite response got', {'response' : response.json()})
document.addEventListener("readystatechange", main);
document.addEventListener("readystatechange", main, { once: true });
} else {
warn("Not a Mastodon instance");
}