mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-09 18:36:35 +00:00
Use dynamic import for cast/demo to show latest build (#6202)
This commit is contained in:
parent
d0ba5696d1
commit
454ddf366a
@ -37,23 +37,21 @@
|
|||||||
<body>
|
<body>
|
||||||
<%= renderTemplate('_js_base') %>
|
<%= renderTemplate('_js_base') %>
|
||||||
|
|
||||||
<script type="module" crossorigin="use-credentials">
|
<script>
|
||||||
import "<%= latestLauncherJS %>";
|
import("<%= latestLauncherJS %>");
|
||||||
|
window.latestJS = true;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script nomodule>
|
<script>
|
||||||
(function() {
|
if (!window.latestJS) {
|
||||||
// // Safari 10.1 supports type=module but ignores nomodule, so we add this check.
|
<% if (useRollup) { %>
|
||||||
if (!isS101) {
|
_ls("/static/js/s.min.js").onload = function() {
|
||||||
<% if (useRollup) { %>
|
System.import("<%= es5LauncherJS %>");
|
||||||
_ls("/static/js/s.min.js").onload = function() {
|
};
|
||||||
System.import("<%= es5LauncherJS %>");
|
<% } else { %>
|
||||||
};
|
_ls("<%= es5LauncherJS %>");
|
||||||
<% } else { %>
|
<% } %>
|
||||||
_ls("<%= es5LauncherJS %>");
|
}
|
||||||
<% } %>
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<hc-layout subtitle="FAQ">
|
<hc-layout subtitle="FAQ">
|
||||||
@ -253,7 +251,7 @@ http:
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
var _gaq = [["_setAccount", "UA-57927901-9"], ["_trackPageview"]];
|
var _gaq = [["_setAccount", "UA-57927901-9"], ["_trackPageview"]];
|
||||||
(function(d, t) {
|
(function (d, t) {
|
||||||
var g = d.createElement(t),
|
var g = d.createElement(t),
|
||||||
s = d.getElementsByTagName(t)[0];
|
s = d.getElementsByTagName(t)[0];
|
||||||
g.src =
|
g.src =
|
||||||
|
@ -28,23 +28,21 @@
|
|||||||
|
|
||||||
<hc-connect></hc-connect>
|
<hc-connect></hc-connect>
|
||||||
|
|
||||||
<script type="module" crossorigin="use-credentials">
|
<script>
|
||||||
import "<%= latestLauncherJS %>";
|
import("<%= latestLauncherJS %>");
|
||||||
|
window.latestJS = true;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script nomodule>
|
<script>
|
||||||
(function() {
|
if (!window.latestJS) {
|
||||||
// // Safari 10.1 supports type=module but ignores nomodule, so we add this check.
|
<% if (useRollup) { %>
|
||||||
if (!isS101) {
|
_ls("/static/js/s.min.js").onload = function() {
|
||||||
<% if (useRollup) { %>
|
System.import("<%= es5LauncherJS %>");
|
||||||
_ls("/static/js/s.min.js").onload = function() {
|
};
|
||||||
System.import("<%= es5LauncherJS %>");
|
<% } else { %>
|
||||||
};
|
_ls("<%= es5LauncherJS %>");
|
||||||
<% } else { %>
|
<% } %>
|
||||||
_ls("<%= es5LauncherJS %>");
|
}
|
||||||
<% } %>
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||||
|
@ -86,26 +86,26 @@
|
|||||||
<%= renderTemplate('_js_base') %>
|
<%= renderTemplate('_js_base') %>
|
||||||
<%= renderTemplate('_preload_roboto') %>
|
<%= renderTemplate('_preload_roboto') %>
|
||||||
|
|
||||||
<script type="module" src="<%= latestDemoJS %>"></script>
|
<script>
|
||||||
|
import("<%= latestDemoJS %>");
|
||||||
|
window.latestJS = true;
|
||||||
|
</script>
|
||||||
|
|
||||||
<script nomodule>
|
<script>
|
||||||
(function() {
|
if (!window.latestJS) {
|
||||||
// // Safari 10.1 supports type=module but ignores nomodule, so we add this check.
|
<% if (useRollup) { %>
|
||||||
if (!isS101) {
|
_ls("/static/js/s.min.js").onload = function() {
|
||||||
<% if (useRollup) { %>
|
System.import("<%= es5DemoJS %>");
|
||||||
_ls("/static/js/s.min.js").onload = function() {
|
};
|
||||||
System.import("<%= es5DemoJS %>");
|
<% } else { %>
|
||||||
};
|
_ls("<%= es5DemoJS %>");
|
||||||
<% } else { %>
|
<% } %>
|
||||||
_ls("<%= es5DemoJS %>");
|
}
|
||||||
<% } %>
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var _gaq = [["_setAccount", "UA-57927901-5"], ["_trackPageview"]];
|
var _gaq = [["_setAccount", "UA-57927901-5"], ["_trackPageview"]];
|
||||||
(function(d, t) {
|
(function (d, t) {
|
||||||
var g = d.createElement(t),
|
var g = d.createElement(t),
|
||||||
s = d.getElementsByTagName(t)[0];
|
s = d.getElementsByTagName(t)[0];
|
||||||
g.src =
|
g.src =
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
<%= renderTemplate('_js_base') %>
|
<%= renderTemplate('_js_base') %>
|
||||||
<%= renderTemplate('_preload_roboto') %>
|
<%= renderTemplate('_preload_roboto') %>
|
||||||
|
|
||||||
<script>
|
<script crossorigin="use-credentials">
|
||||||
import("<%= latestCoreJS %>");
|
import("<%= latestCoreJS %>");
|
||||||
import("<%= latestAppJS %>");
|
import("<%= latestAppJS %>");
|
||||||
window.customPanelJS = "<%= latestCustomPanelJS %>";
|
window.customPanelJS = "<%= latestCustomPanelJS %>";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user