From 35a1700c0e5ba50d0b1cf5467ddce6e42efa594f Mon Sep 17 00:00:00 2001 From: Will Latourelle Date: Tue, 16 Jun 2020 22:09:39 -0700 Subject: [PATCH] minor message changes and formatting --- dist/animated-background.js | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/dist/animated-background.js b/dist/animated-background.js index 2899820..31279b5 100644 --- a/dist/animated-background.js +++ b/dist/animated-background.js @@ -356,7 +356,7 @@ function renderBackgroundHTML() { if (current_config.state_url[current_state]) { if (Previous_State != current_state) { View_Loaded = false; - STATUS_MESSAGE("Configured entity " + current_config.entity + " is now " + current_state, true); + DEBUG_MESSAGE("Configured entity " + current_config.entity + " is now " + current_state, true); if (current_config.state_url) { var url = current_config.state_url[current_state]; if (Array.isArray(url)) { @@ -429,11 +429,11 @@ function renderBackgroundHTML() { var bg = Hui.shadowRoot.getElementById("background-iframe"); var video_type = urlIsVideo(state_url); var doc_body; - if(video_type){ + if (video_type) { doc_body = `` } - else{ - doc_body = `` + else { + doc_body = `` } var source_doc = ` @@ -515,11 +515,11 @@ function renderBackgroundHTML() { } } -function urlIsVideo(url){ - if(url.slice(url.length - 3).toLowerCase() == "mp4" || url.slice(url.length - 4).toLowerCase() == "webm"){ +function urlIsVideo(url) { + if (url.slice(url.length - 3).toLowerCase() == "mp4" || url.slice(url.length - 4).toLowerCase() == "webm") { return url.slice(url.length - 3).toLowerCase(); } - if(url.slice(url.length - 4).toLowerCase() == "webm"){ + if (url.slice(url.length - 4).toLowerCase() == "webm") { return url.slice(url.length - 4).toLowerCase(); } return false; @@ -528,7 +528,7 @@ function urlIsVideo(url){ //removes lovelace theme background function removeDefaultBackground(node, current_config) { var background = 'transparent'; - if(current_config.background){ + if (current_config.background) { background = current_config.background; } if (node.style.background != background || View_Layout.style.background != 'transparent') { @@ -623,11 +623,13 @@ function run() { STATUS_MESSAGE("Starting"); DEBUG_MESSAGE("Starting, Debug mode enabled"); if (!Loaded) { - if (!currentConfig() && Debug_Mode) { - DEBUG_MESSAGE("No configuration found for this view"); - } - else { - STATUS_MESSAGE("No configuration found for this dashboard"); + if (!currentConfig()) { + if (Debug_Mode) { + DEBUG_MESSAGE("No configuration found"); + } + else { + STATUS_MESSAGE("No configuration found"); + } } }