Managed to move css injection to a link tag by moving the link tag inside the div.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
document.addEventListener('pageshow', async () => {
|
||||
await fetchHomepageCSS();
|
||||
await updateMediaCleanerState();
|
||||
|
||||
var moviesTitle = document.getElementById("moviesTitle");
|
||||
@@ -136,16 +135,3 @@ const finishLoading = () => {
|
||||
console.log("Loading element: ", loadingElement);
|
||||
console.log("Homepage element: ", homepage);
|
||||
}
|
||||
|
||||
const fetchHomepageCSS = async () => {
|
||||
const response = await fetch('/web/configurationpage?name=home.css')
|
||||
|
||||
if(!response.ok){
|
||||
throw new Error(`Response status: ${response.status}`);
|
||||
}
|
||||
|
||||
const css = await response.text();
|
||||
const styles = document.createElement('style');
|
||||
styles.textContent = css;
|
||||
document.head.appendChild(styles);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user