update js on index to run after all is loaded

pull/1/head
lza_menace 4 years ago
parent e7f1e045ce
commit 49f69707c4

@ -52,7 +52,8 @@
</section> </section>
{% endif %} {% endif %}
<script> <script type="text/javascript">
window.onload = function() {
{% for op in funded_ops %} {% for op in funded_ops %}
fetch('/api/info/{{ op.codename }}') fetch('/api/info/{{ op.codename }}')
.then((resp) => resp.json()) .then((resp) => resp.json())
@ -68,6 +69,7 @@
s.innerHTML = html s.innerHTML = html
}) })
{% endfor %} {% endfor %}
}
</script> </script>
{% include 'includes/footer.html' %} {% include 'includes/footer.html' %}

Loading…
Cancel
Save