Compare commits
1 Commits
Media-Clea
...
629d5d1f2e
| Author | SHA1 | Date | |
|---|---|---|---|
| 629d5d1f2e |
@@ -2,7 +2,6 @@
|
||||
data-controller="__plugin/home.js">
|
||||
<div data-role="content">
|
||||
<div class="content-primary">
|
||||
<link rel="stylesheet" href="/web/configurationpage?name=home.css" />
|
||||
<div id="loading">Loading...</div>
|
||||
<div id="homepage" style="visibility: hidden;">
|
||||
<button class="links" data-target="configurationpage?name=Settings">Settings</button>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
document.addEventListener('pageshow', async () => {
|
||||
await fetchHomepageCSS();
|
||||
await updateMediaCleanerState();
|
||||
|
||||
var moviesTitle = document.getElementById("moviesTitle");
|
||||
@@ -135,3 +136,16 @@ 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