Use setInterval instead of setTimeout on the extension

This commit is contained in:
Carlos Quintana 2022-05-19 11:51:18 +02:00
parent b4da667a5e
commit e4d6f1f117
No known key found for this signature in database
GPG Key ID: 15E73DCC410679F8
2 changed files with 3 additions and 3 deletions

View File

@ -33,7 +33,7 @@
setInterval(function() {
const data = { tag: "PERFORM_EXTENSION_SETUP" };
window.postMessage(data, "/");
}, 300); // Give some time to the extension for registering the listener
}, 300); // Send it many times, in case the extension had not registered the listener yet
</script>
{% endif %}

View File

@ -20,10 +20,10 @@
</div>
<script type="text/javascript">
setTimeout(function() {
setInterval(function() {
const data = { tag: "PERFORM_EXTENSION_SETUP" };
window.postMessage(data, "/");
}, 300);
}, 300); // Send it many times, in case the extension had not registered the listener yet
</script>
{% endblock %}