Removed as requested

This commit is contained in:
Henrik 2023-04-23 21:36:19 +02:00
parent 92f9c908f6
commit 16373919d4

View File

@ -184,26 +184,18 @@ function loadBg(iUrl)
}); });
} }
function loadSkinCSS(cId) { function loadSkinCSS(cId)
{
if (!gId(cId)) // check if element exists 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'; var h = d.getElementsByTagName('head')[0];
fetch(url) var l = d.createElement('link');
.then(response => { l.id = cId;
if (response.ok) { l.rel = 'stylesheet';
var h = d.getElementsByTagName('head')[0]; l.type = 'text/css';
var l = d.createElement('link'); l.href = (loc?`http://${locip}`:'.') + '/skin.css';
l.id = cId; l.media = 'all';
l.rel = 'stylesheet'; h.appendChild(l);
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.');
}
})
} }
} }