mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-22 16:56:35 +00:00
Move Jinja directives to own script block (#6166)
This commit is contained in:
parent
f53f81dbc4
commit
8c0c0592e2
@ -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 -%}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user