summaryrefslogtreecommitdiffstats
path: root/krebs/2configs/reaktor2.nix
diff options
context:
space:
mode:
Diffstat (limited to 'krebs/2configs/reaktor2.nix')
-rw-r--r--krebs/2configs/reaktor2.nix22
1 files changed, 12 insertions, 10 deletions
diff --git a/krebs/2configs/reaktor2.nix b/krebs/2configs/reaktor2.nix
index e9837ff7c..4a33c33ec 100644
--- a/krebs/2configs/reaktor2.nix
+++ b/krebs/2configs/reaktor2.nix
@@ -187,16 +187,18 @@ in {
const params = Object.fromEntries(urlSearchParams.entries());
if (params.hasOwnProperty("style")) {
- fetch(params["style"])
- .then((response) =>
- response.text().then((css) => {
- const title = document.getElementsByTagName("title")[0];
- const style = document.createElement("style");
- style.appendChild(document.createTextNode(css));
- title.appendChild(style);
- })
- )
- .catch(console.log);
+ const cssUrls = params["style"].split(" ").filter((x) => x.length > 0);
+ for (const cssUrl of cssUrls)
+ fetch(cssUrl)
+ .then((response) =>
+ response.text().then((css) => {
+ const title = document.getElementsByTagName("head")[0];
+ const style = document.createElement("style");
+ style.appendChild(document.createTextNode(css));
+ title.appendChild(style);
+ })
+ )
+ .catch(console.log);
}
fetch("/agenda.json")