Skip to content

Commit

Permalink
Merge pull request Villhellm#34 from Villhellm/fully-fix
Browse files Browse the repository at this point in the history
Fully fix
  • Loading branch information
Villhellm authored Jul 31, 2020
2 parents 35a1700 + e1954aa commit cbacf95
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions dist/animated-background.js
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,8 @@ function renderBackgroundHTML() {
if (!current_config.entity) {
STATUS_MESSAGE("Applying default background", true);
}
html_to_render = `<style>
var style = document.createElement("style");
style.innerHTML = `
.bg-video{
min-width: 100vw;
min-height: 100vh;
Expand All @@ -493,12 +494,15 @@ function renderBackgroundHTML() {
min-width: 100vw;
min-height: 100vh;
z-index: -10;
}
</style>
<div id="background-video" class="bg-wrap">
}`;
var div = document.createElement("div");
div.id = "background-video";
div.className = "bg-wrap"
div.innerHTML = `
<iframe id="background-iframe" class="bg-video" frameborder="0" srcdoc="${source_doc}"/>
</div>`;
View_Layout.insertAdjacentHTML("beforebegin", html_to_render);
`;
Root.shadowRoot.appendChild(style);
Root.shadowRoot.appendChild(div)
Previous_Url = state_url;
}
else {
Expand Down

0 comments on commit cbacf95

Please sign in to comment.