From a0bc82df3ebf251e065097b67caa734e3b544b78 Mon Sep 17 00:00:00 2001 From: Daniel Reimer Date: Thu, 6 Apr 2023 02:57:58 +0200 Subject: [PATCH 1/2] Update animated-background.js Hackfix for 2023.4.0 --- dist/animated-background.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/dist/animated-background.js b/dist/animated-background.js index 525a89a..9ff90bc 100644 --- a/dist/animated-background.js +++ b/dist/animated-background.js @@ -8,7 +8,6 @@ var Panel_Holder; var Hui; var Lovelace; var Animated_Config; -var View_Layout; var Haobj = null; var View; var Debug_Mode = false; @@ -56,7 +55,7 @@ function getVars() { Root = Root && Root.shadowRoot; Root = Root && Root.querySelector("home-assistant-main"); Root = Root && Root.shadowRoot; - Root = Root && Root.querySelector("app-drawer-layout partial-panel-resolver"); + Root = Root && Root.querySelector("app-drawer-layout partial-panel-resolver, ha-drawer partial-panel-resolver"); Root = (Root && Root.shadowRoot) || Root; Root = Root && Root.querySelector("ha-panel-lovelace"); if (Root) { @@ -70,7 +69,6 @@ function getVars() { if (Lovelace) { Animated_Config = Lovelace.config.animated_background; } - View_Layout = Root.shadowRoot.getElementById("layout"); View = Root.shadowRoot.getElementById("view"); } } @@ -535,15 +533,13 @@ function removeDefaultBackground(node, current_config) { if (current_config.background) { background = current_config.background; } - if (node.style.background != background || View_Layout.style.background != 'transparent') { + if (node.style.background != background) { node.style.background = background; - View_Layout.style.background = 'transparent'; } } //restores lovelace theme background function restoreDefaultBackground(node) { - View_Layout.style.background = null; node.style.background = null; } From 8c883809e9e85043b904f9b45f8705e2b94dfeed Mon Sep 17 00:00:00 2001 From: Daniel Reimer Date: Sat, 18 Nov 2023 12:47:30 +0100 Subject: [PATCH 2/2] Update README.md Add information how to add the addin as custom repo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2c49c14..8f1ceaf 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ views: ... ### Step 1 -Make sure you have [HACS](https://github.com/custom-components/hacs) installed, find Animated Background in the plug section, and install. +Make sure you have [HACS](https://github.com/custom-components/hacs) installed, add https://github.com/dreimer1986/lovelace-animated-background as custom repo and find Animated Background in the plug section, and install. ### Step 2