Added 'Clocko' widget

This commit is contained in:
nutty
2026-08-07 06:28:48 +10:00
parent 8ef8af4288
commit e4820dc1ca
6 changed files with 484 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
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", "");
const usesStreamerBot = "&usesStreamerBot=false";
console.debug("Window Ref: " + window.location.href);
console.debug("Base URL: " + baseURL);
console.debug("Settings JSON: " + settingsJSON);
console.debug("Widget URL: " + widgetURL);
console.debug("Uses Streamer Bot: " + usesStreamerBot);
widgetContainer.src = settingsPageURL + settingsJSON + widgetURL + usesStreamerBot;