Fixed issue with dynamic buttons not working

This commit is contained in:
nuttylmao
2025-04-23 04:56:41 +10:00
parent c4d1b67312
commit b9786da56f
4 changed files with 241 additions and 259 deletions
+1 -1
View File
@@ -137,7 +137,7 @@ fetch(settingsJson)
inputElement.textContent = setting.label;
inputElement.addEventListener('click', () => {
widgetPreview.contentWindow.callFunction(setting.callFunction);
widgetPreview.contentWindow[setting.callFunction]();
const defaultBackgroundColor = "#2e2e2e";
const defaultTextColor = "white";
-6
View File
@@ -21,9 +21,3 @@ console.debug("Settings JSON: " + settingsJSON);
console.debug("Widget URL: " + widgetURL);
widgetContainer.src = settingsPageURL + settingsJSON + widgetURL;
function callFunction(functionName) {
console.debug(`Calling ${functionName}`);
let widget = document.getElementById("widget");
widget.contentWindow[functionName]();
}
-6
View File
@@ -21,9 +21,3 @@ console.debug("Settings JSON: " + settingsJSON);
console.debug("Widget URL: " + widgetURL);
widgetContainer.src = settingsPageURL + settingsJSON + widgetURL;
function callFunction(functionName) {
console.debug(`Calling ${functionName}`);
let widget = document.getElementById("widget");
widget.contentWindow[functionName]();
}
-6
View File
@@ -21,9 +21,3 @@ console.debug("Settings JSON: " + settingsJSON);
console.debug("Widget URL: " + widgetURL);
widgetContainer.src = settingsPageURL + settingsJSON + widgetURL;
function callFunction(functionName) {
console.debug(`Calling ${functionName}`);
let widget = document.getElementById("widget");
widget.contentWindow[functionName]();
}