mirror of
https://github.com/nuttylmao/nutty.gg.git
synced 2026-09-19 04:00:59 -04:00
Fixed issue with dynamic buttons not working
This commit is contained in:
@@ -137,7 +137,7 @@ fetch(settingsJson)
|
|||||||
inputElement.textContent = setting.label;
|
inputElement.textContent = setting.label;
|
||||||
|
|
||||||
inputElement.addEventListener('click', () => {
|
inputElement.addEventListener('click', () => {
|
||||||
widgetPreview.contentWindow.callFunction(setting.callFunction);
|
widgetPreview.contentWindow[setting.callFunction]();
|
||||||
|
|
||||||
const defaultBackgroundColor = "#2e2e2e";
|
const defaultBackgroundColor = "#2e2e2e";
|
||||||
const defaultTextColor = "white";
|
const defaultTextColor = "white";
|
||||||
|
|||||||
@@ -21,9 +21,3 @@ console.debug("Settings JSON: " + settingsJSON);
|
|||||||
console.debug("Widget URL: " + widgetURL);
|
console.debug("Widget URL: " + widgetURL);
|
||||||
|
|
||||||
widgetContainer.src = settingsPageURL + settingsJSON + widgetURL;
|
widgetContainer.src = settingsPageURL + settingsJSON + widgetURL;
|
||||||
|
|
||||||
function callFunction(functionName) {
|
|
||||||
console.debug(`Calling ${functionName}`);
|
|
||||||
let widget = document.getElementById("widget");
|
|
||||||
widget.contentWindow[functionName]();
|
|
||||||
}
|
|
||||||
@@ -21,9 +21,3 @@ console.debug("Settings JSON: " + settingsJSON);
|
|||||||
console.debug("Widget URL: " + widgetURL);
|
console.debug("Widget URL: " + widgetURL);
|
||||||
|
|
||||||
widgetContainer.src = settingsPageURL + settingsJSON + widgetURL;
|
widgetContainer.src = settingsPageURL + settingsJSON + widgetURL;
|
||||||
|
|
||||||
function callFunction(functionName) {
|
|
||||||
console.debug(`Calling ${functionName}`);
|
|
||||||
let widget = document.getElementById("widget");
|
|
||||||
widget.contentWindow[functionName]();
|
|
||||||
}
|
|
||||||
@@ -21,9 +21,3 @@ console.debug("Settings JSON: " + settingsJSON);
|
|||||||
console.debug("Widget URL: " + widgetURL);
|
console.debug("Widget URL: " + widgetURL);
|
||||||
|
|
||||||
widgetContainer.src = settingsPageURL + settingsJSON + widgetURL;
|
widgetContainer.src = settingsPageURL + settingsJSON + widgetURL;
|
||||||
|
|
||||||
function callFunction(functionName) {
|
|
||||||
console.debug(`Calling ${functionName}`);
|
|
||||||
let widget = document.getElementById("widget");
|
|
||||||
widget.contentWindow[functionName]();
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user