Move Jinja directives to own script block (#6166)

This commit is contained in:
Paulus Schoutsen 2020-06-15 07:18:58 -07:00 committed by GitHub
parent f53f81dbc4
commit 8c0c0592e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,12 +58,13 @@
window.customPanelJS = "<%= latestCustomPanelJS %>"; window.customPanelJS = "<%= latestCustomPanelJS %>";
window.latestJS = true; window.latestJS = true;
</script> </script>
<script>
{% for extra_module in extra_modules -%} {% for extra_module in extra_modules -%}
<script type="module" crossorigin="use-credentials" src="{{ extra_module }}"></script> import("{{ extra_module }}");
{% endfor -%} {% endfor -%}
</script>
<script> <script>
(function() {
if (!window.latestJS) { if (!window.latestJS) {
window.customPanelJS = "<%= es5CustomPanelJS %>"; window.customPanelJS = "<%= es5CustomPanelJS %>";
@ -79,11 +80,14 @@
_ls("<%= es5CoreJS %>"); _ls("<%= es5CoreJS %>");
_ls("<%= es5AppJS %>"); _ls("<%= es5AppJS %>");
<% } %> <% } %>
{% for extra_script in extra_js_es5 -%}
_ls("{{ extra_script }}");
{% endfor -%}
} }
})(); </script>
<script>
if (!window.latestJS) {
{% for extra_script in extra_js_es5 -%}
_ls("{{ extra_script }}");
{% endfor -%}
}
</script> </script>
{% for extra_url in extra_urls -%} {% for extra_url in extra_urls -%}