From 16373919d465780c604a3b063592e55082ae04bc Mon Sep 17 00:00:00 2001 From: Henrik Date: Sun, 23 Apr 2023 21:36:19 +0200 Subject: [PATCH] Removed as requested --- wled00/data/index.js | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/wled00/data/index.js b/wled00/data/index.js index 19fe8cbd..93ad3f13 100644 --- a/wled00/data/index.js +++ b/wled00/data/index.js @@ -184,26 +184,18 @@ function loadBg(iUrl) }); } -function loadSkinCSS(cId) { +function loadSkinCSS(cId) +{ if (!gId(cId)) // check if element exists - //This is called by if (cfg.comp.css) loadSkinCSS('skinCss'); but ideally this should return false if the file does not exist. Needs checking on the server side. { - var url = (loc?`http://${locip}`:'.') + '/skin.css'; - fetch(url) - .then(response => { - if (response.ok) { - var h = d.getElementsByTagName('head')[0]; - var l = d.createElement('link'); - l.id = cId; - l.rel = 'stylesheet'; - l.type = 'text/css'; - l.href = url; - l.media = 'all'; - h.appendChild(l); - } else { - console.log('CSS file not found. You can disable CSS file usage in settings to remove this message.'); - } - }) + var h = d.getElementsByTagName('head')[0]; + var l = d.createElement('link'); + l.id = cId; + l.rel = 'stylesheet'; + l.type = 'text/css'; + l.href = (loc?`http://${locip}`:'.') + '/skin.css'; + l.media = 'all'; + h.appendChild(l); } }