Added new "Now Playing" widget

This commit is contained in:
nutty
2026-06-27 01:36:53 +10:00
parent df63177388
commit ac97a901b4
9 changed files with 1049 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
const widgetContainer = document.getElementById('widgetContainer');
const settingsPageURL = '/.common/core/settings-core';
const currentURL = window.location.href;
let settingsJSON;
let baseURL = currentURL;
if (baseURL.endsWith("index.html"))
baseURL = baseURL.replace("index.html", "");
settingsJSON = "?settingsJson=" + baseURL + "settings.json";
const lastSlashIndex = baseURL.lastIndexOf("/");
let widgetURL = "&widgetURL=" + baseURL.replace("/settings", "");
console.debug("Window Ref: " + window.location.href);
console.debug("Base URL: " + baseURL);
console.debug("Settings JSON: " + settingsJSON);
console.debug("Widget URL: " + widgetURL);
widgetContainer.src = settingsPageURL + settingsJSON + widgetURL;