Created ".utilities" folder and move "widget-customizer" to it (renamed it "settings-page-builder"

This commit is contained in:
nuttylmao
2025-04-01 18:09:00 +11:00
parent a43a2db8d5
commit 82a9574104
5 changed files with 550 additions and 550 deletions
@@ -1,40 +1,40 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Settings</title> <title>Settings</title>
<link rel="stylesheet" href="style.css"> <link rel="stylesheet" href="style.css">
</head> </head>
<body> <body>
<div id="pinned-header"> <div id="pinned-header">
<h2>Widget URL</h2> <h2>Widget URL</h2>
<input id="widget-url" type="text" readonly> <input id="widget-url" type="text" readonly>
<button id="save-settings">Click to copy URL</button> <button id="save-settings">Click to copy URL</button>
<button onclick="OpenMembershipPage()">💎 Member Exclusive Widgets</button> <button onclick="OpenMembershipPage()">💎 Member Exclusive Widgets</button>
</div> </div>
<div id="settings-container"> <div id="settings-container">
<div id="settings-content"></div> <div id="settings-content"></div>
</div> </div>
<script src="script.js"></script> <script src="script.js"></script>
<div id="mommy-milkers"> <div id="mommy-milkers">
<div id="load-settings-container"> <div id="load-settings-container">
<h2>Load Settings From Widget URL</h2> <h2>Load Settings From Widget URL</h2>
<input id="load-url" type="text"> <input id="load-url" type="text">
<div style="display: flex;"> <div style="display: flex;">
<button id="cancel-settings" onclick="CloseSettings()">Cancel</button> <button id="cancel-settings" onclick="CloseSettings()">Cancel</button>
<span style="width: 20px;"></span> <span style="width: 20px;"></span>
<button id="load-settings" onclick="LoadSettings()">Load Settings</button> <button id="load-settings" onclick="LoadSettings()">Load Settings</button>
</div> </div>
</div> </div>
</div> </div>
</body> </body>
</html> </html>
@@ -1,237 +1,237 @@
const queryString = window.location.search; const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString); const urlParams = new URLSearchParams(queryString);
const settingsJson = urlParams.get("settingsJson") || ""; const settingsJson = urlParams.get("settingsJson") || "";
document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', () => {
const settingsContent = document.getElementById('settings-content'); const settingsContent = document.getElementById('settings-content');
const saveButton = document.getElementById('save-settings'); const saveButton = document.getElementById('save-settings');
fetch(settingsJson) fetch(settingsJson)
//fetch('../multichat-overlay/settings/settings.json') //fetch('../multichat-overlay/settings/settings.json')
.then(response => response.json()) .then(response => response.json())
.then(data => { .then(data => {
const groupedSettings = {}; const groupedSettings = {};
// Group settings by their 'group' property // Group settings by their 'group' property
data.settings.forEach(setting => { data.settings.forEach(setting => {
if (!groupedSettings[setting.group]) { if (!groupedSettings[setting.group]) {
groupedSettings[setting.group] = []; groupedSettings[setting.group] = [];
} }
groupedSettings[setting.group].push(setting); groupedSettings[setting.group].push(setting);
}); });
// Render settings for each group // Render settings for each group
for (const groupName in groupedSettings) { for (const groupName in groupedSettings) {
const groupDiv = document.createElement('div'); const groupDiv = document.createElement('div');
groupDiv.classList.add('setting-group'); groupDiv.classList.add('setting-group');
const groupHeader = document.createElement('h2'); const groupHeader = document.createElement('h2');
groupHeader.textContent = groupName; groupHeader.textContent = groupName;
groupDiv.appendChild(groupHeader); groupDiv.appendChild(groupHeader);
groupedSettings[groupName].forEach(setting => { groupedSettings[groupName].forEach(setting => {
const settingItem = document.createElement('div'); const settingItem = document.createElement('div');
settingItem.classList.add('setting-item'); settingItem.classList.add('setting-item');
const labelDescriptionDiv = document.createElement('div'); const labelDescriptionDiv = document.createElement('div');
const label = document.createElement('label'); const label = document.createElement('label');
label.textContent = setting.label; label.textContent = setting.label;
labelDescriptionDiv.appendChild(label); labelDescriptionDiv.appendChild(label);
if (setting.description) { if (setting.description) {
const description = document.createElement('p'); const description = document.createElement('p');
description.innerHTML = setting.description; description.innerHTML = setting.description;
labelDescriptionDiv.appendChild(description); labelDescriptionDiv.appendChild(description);
} }
const settingItemContent = document.createElement('div'); const settingItemContent = document.createElement('div');
settingItemContent.classList.add('setting-item-content'); settingItemContent.classList.add('setting-item-content');
let inputElement; let inputElement;
switch (setting.type) { switch (setting.type) {
case 'text': case 'text':
inputElement = document.createElement('input'); inputElement = document.createElement('input');
inputElement.type = 'text'; inputElement.type = 'text';
inputElement.id = setting.id; //Added setting ID inputElement.id = setting.id; //Added setting ID
inputElement.value = setting.defaultValue; inputElement.value = setting.defaultValue;
break; break;
case 'checkbox': case 'checkbox':
const labelDiv = document.createElement('label'); const labelDiv = document.createElement('label');
labelDiv.classList.add('switch'); labelDiv.classList.add('switch');
checkBoxElement = document.createElement('input'); checkBoxElement = document.createElement('input');
checkBoxElement.type = 'checkbox'; checkBoxElement.type = 'checkbox';
checkBoxElement.id = setting.id; checkBoxElement.id = setting.id;
checkBoxElement.checked = setting.defaultValue; checkBoxElement.checked = setting.defaultValue;
labelDiv.appendChild(checkBoxElement); labelDiv.appendChild(checkBoxElement);
const slider = document.createElement('span'); const slider = document.createElement('span');
slider.classList.add('slider'); slider.classList.add('slider');
slider.classList.add('round'); slider.classList.add('round');
labelDiv.appendChild(slider); labelDiv.appendChild(slider);
// Add event listener to the switchDiv // Add event listener to the switchDiv
labelDiv.addEventListener('click', () => { labelDiv.addEventListener('click', () => {
checkBoxElement.checked = !checkBoxElement.checked; checkBoxElement.checked = !checkBoxElement.checked;
}); });
inputElement = labelDiv; inputElement = labelDiv;
break; break;
case 'select': case 'select':
inputElement = document.createElement('select'); inputElement = document.createElement('select');
inputElement.id = setting.id; //Added setting ID inputElement.id = setting.id; //Added setting ID
setting.options.forEach(option => { setting.options.forEach(option => {
const optionElement = document.createElement('option'); const optionElement = document.createElement('option');
optionElement.value = option.value; optionElement.value = option.value;
optionElement.textContent = option.label; optionElement.textContent = option.label;
if (option === setting.defaultValue) { if (option === setting.defaultValue) {
optionElement.selected = true; optionElement.selected = true;
} }
inputElement.value = setting.defaultValue; inputElement.value = setting.defaultValue;
inputElement.appendChild(optionElement); inputElement.appendChild(optionElement);
}); });
break; break;
case 'color': case 'color':
inputElement = document.createElement('input'); inputElement = document.createElement('input');
inputElement.type = 'color'; inputElement.type = 'color';
inputElement.id = setting.id; //Added setting ID inputElement.id = setting.id; //Added setting ID
inputElement.value = setting.defaultValue; inputElement.value = setting.defaultValue;
break; break;
case 'number': case 'number':
inputElement = document.createElement('input'); inputElement = document.createElement('input');
inputElement.type = 'number'; inputElement.type = 'number';
inputElement.id = setting.id; //Added setting ID inputElement.id = setting.id; //Added setting ID
inputElement.value = setting.defaultValue; inputElement.value = setting.defaultValue;
inputElement.min = setting.min; inputElement.min = setting.min;
inputElement.max = setting.max; inputElement.max = setting.max;
inputElement.step = setting.step; inputElement.step = setting.step;
break; break;
default: default:
inputElement = document.createElement('input'); inputElement = document.createElement('input');
inputElement.type = 'text'; inputElement.type = 'text';
inputElement.id = setting.id; //Added setting ID inputElement.id = setting.id; //Added setting ID
inputElement.value = setting.defaultValue; inputElement.value = setting.defaultValue;
} }
inputElement.addEventListener('input', function (event) { inputElement.addEventListener('input', function (event) {
SendDateToParent(data); SendDateToParent(data);
}); });
settingItemContent.appendChild(inputElement); settingItemContent.appendChild(inputElement);
settingItem.appendChild(labelDescriptionDiv); settingItem.appendChild(labelDescriptionDiv);
settingItem.appendChild(settingItemContent); settingItem.appendChild(settingItemContent);
groupDiv.appendChild(settingItem); groupDiv.appendChild(settingItem);
}); });
settingsContent.appendChild(groupDiv); settingsContent.appendChild(groupDiv);
} }
// saveButton.addEventListener('click', () => { // saveButton.addEventListener('click', () => {
// SendDateToParent(data); // SendDateToParent(data);
// }); // });
SendDateToParent(data); SendDateToParent(data);
}) })
.catch(error => console.error('Error loading settings:', error)); .catch(error => console.error('Error loading settings:', error));
}); });
// In the iframe's JavaScript: // In the iframe's JavaScript:
function SendDateToParent(data) { function SendDateToParent(data) {
const settings = {}; const settings = {};
data.settings.forEach(setting => { data.settings.forEach(setting => {
let inputElement = document.getElementById(setting.id); let inputElement = document.getElementById(setting.id);
if (setting.type === 'checkbox') { if (setting.type === 'checkbox') {
settings[setting.id] = inputElement.checked; settings[setting.id] = inputElement.checked;
} else { } else {
settings[setting.id] = inputElement.value; settings[setting.id] = inputElement.value;
} }
}); });
// Generate parameter string // Generate parameter string
const paramString = Object.entries(settings) const paramString = Object.entries(settings)
.map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`) .map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`)
.join('&'); .join('&');
console.log('Parameter String:', paramString); console.log('Parameter String:', paramString);
let widgetURLBox = document.getElementById('widget-url'); let widgetURLBox = document.getElementById('widget-url');
widgetURLBox.value = GetWidgetURL() + "?" + paramString; widgetURLBox.value = GetWidgetURL() + "?" + paramString;
window.parent.reloadWidget(paramString); window.parent.reloadWidget(paramString);
} }
let saveButton = document.getElementById('save-settings'); let saveButton = document.getElementById('save-settings');
let widgetURLBox = document.getElementById('widget-url'); let widgetURLBox = document.getElementById('widget-url');
let cancelSettingsButton = document.getElementById('cancel-settings'); let cancelSettingsButton = document.getElementById('cancel-settings');
saveButton.addEventListener('click', () => { saveButton.addEventListener('click', () => {
navigator.clipboard.writeText(widgetURLBox.value); navigator.clipboard.writeText(widgetURLBox.value);
const defaultBackgroundColor = "#2e2e2e"; const defaultBackgroundColor = "#2e2e2e";
const defaultTextColor = "white"; const defaultTextColor = "white";
saveButton.innerText = "Copied to clipboard"; saveButton.innerText = "Copied to clipboard";
saveButton.style.backgroundColor = "#00dd63" saveButton.style.backgroundColor = "#00dd63"
saveButton.style.color = "#ffffff"; saveButton.style.color = "#ffffff";
setTimeout(() => { setTimeout(() => {
saveButton.innerText = "Click to copy URL"; saveButton.innerText = "Click to copy URL";
saveButton.style.backgroundColor = defaultBackgroundColor; saveButton.style.backgroundColor = defaultBackgroundColor;
saveButton.style.color = defaultTextColor; saveButton.style.color = defaultTextColor;
}, 3000); }, 3000);
}); });
widgetURLBox.addEventListener('click', () => { widgetURLBox.addEventListener('click', () => {
let loadSettingsBox = document.getElementById('mommy-milkers'); let loadSettingsBox = document.getElementById('mommy-milkers');
loadSettingsBox.style.visibility = 'visible'; loadSettingsBox.style.visibility = 'visible';
loadSettingsBox.style.opacity = 1; loadSettingsBox.style.opacity = 1;
}); });
function CloseSettings() { function CloseSettings() {
let loadSettingsBox = document.getElementById('mommy-milkers'); let loadSettingsBox = document.getElementById('mommy-milkers');
loadSettingsBox.style.visibility = 'hidden'; loadSettingsBox.style.visibility = 'hidden';
loadSettingsBox.style.opacity = 0; loadSettingsBox.style.opacity = 0;
}; };
function LoadSettings() { function LoadSettings() {
let loadURLBox = document.getElementById('load-url'); let loadURLBox = document.getElementById('load-url');
const url = new URL(loadURLBox.value); const url = new URL(loadURLBox.value);
url.searchParams.forEach((value, key) => { url.searchParams.forEach((value, key) => {
const inputElement = document.getElementById(key); const inputElement = document.getElementById(key);
if (inputElement != null) if (inputElement != null)
{ {
if (inputElement.type == 'checkbox') if (inputElement.type == 'checkbox')
inputElement.checked = value.toLocaleLowerCase() == 'true'; inputElement.checked = value.toLocaleLowerCase() == 'true';
else else
inputElement.value = value; inputElement.value = value;
} }
}); });
loadURLBox.value = ''; loadURLBox.value = '';
let loadSettingsBox = document.getElementById('mommy-milkers'); let loadSettingsBox = document.getElementById('mommy-milkers');
loadSettingsBox.style.visibility = 'hidden'; loadSettingsBox.style.visibility = 'hidden';
loadSettingsBox.style.opacity = 0; loadSettingsBox.style.opacity = 0;
} }
function GetWidgetURL() { function GetWidgetURL() {
const parsedUrl = new URL(settingsJson); const parsedUrl = new URL(settingsJson);
let result = parsedUrl.origin; // Base domain (protocol + hostname + port) let result = parsedUrl.origin; // Base domain (protocol + hostname + port)
const pathSegments = parsedUrl.pathname.split('/').filter(segment => segment); // Split and remove empty segments const pathSegments = parsedUrl.pathname.split('/').filter(segment => segment); // Split and remove empty segments
if (pathSegments.length > 0) { if (pathSegments.length > 0) {
result += '/' + pathSegments[0]; // Add the first path segment result += '/' + pathSegments[0]; // Add the first path segment
} }
return result; return result;
} }
function OpenMembershipPage() { function OpenMembershipPage() {
window.open("https://nutty.gg/supporters/sign_in", '_blank').focus(); window.open("https://nutty.gg/supporters/sign_in", '_blank').focus();
} }
@@ -1,274 +1,274 @@
* { * {
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif; font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
font-size: 16px; font-size: 16px;
color: white; color: white;
} }
body { body {
background-color: #181818; background-color: #181818;
} }
body::-webkit-scrollbar { body::-webkit-scrollbar {
width: 8px; width: 8px;
/* Width of the entire scrollbar */ /* Width of the entire scrollbar */
} }
body::-webkit-scrollbar-track { body::-webkit-scrollbar-track {
background: #2c2c2c; background: #2c2c2c;
/* Color of the tracking area */ /* Color of the tracking area */
} }
body::-webkit-scrollbar-thumb { body::-webkit-scrollbar-thumb {
background-color: #9f9f9f; background-color: #9f9f9f;
/* Color of the scroll thumb */ /* Color of the scroll thumb */
border-radius: 4px; border-radius: 4px;
/* Roundness of the scroll thumb */ /* Roundness of the scroll thumb */
border: none; border: none;
} }
body::-webkit-scrollbar-thumb:hover { body::-webkit-scrollbar-thumb:hover {
background-color: #d1d1d1; background-color: #d1d1d1;
/* Color of the scroll thumb on hover */ /* Color of the scroll thumb on hover */
} }
#pinned-header { #pinned-header {
position: sticky; position: sticky;
top: 0; top: 0;
margin: 40px auto; margin: 40px auto;
padding: 10px 0; padding: 10px 0;
z-index: 100; z-index: 100;
background: #181818af; background: #181818af;
backdrop-filter: blur(10px); backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
} }
#widget-url { #widget-url {
font-size: 1em; font-size: 1em;
width: 100%; width: 100%;
margin: 10px 0px; margin: 10px 0px;
padding: 10px 10px; padding: 10px 10px;
} }
#settings-container { #settings-container {
margin: 0px auto; margin: 0px auto;
/* border: 1px solid #ddd; */ /* border: 1px solid #ddd; */
border-radius: 5px; border-radius: 5px;
} }
#settings-container h1 { #settings-container h1 {
text-align: center; text-align: center;
margin-bottom: 20px; margin-bottom: 20px;
} }
.setting-group { .setting-group {
margin-bottom: 20px; margin-bottom: 20px;
/* border: 1px solid #ddd; */ /* border: 1px solid #ddd; */
padding: 15px; padding: 15px;
border-radius: 5px; border-radius: 5px;
} }
h2 { h2 {
font-size: 0.9em; font-size: 0.9em;
font-weight: 500; font-weight: 500;
color: #93cdfd; color: #93cdfd;
} }
.setting-item { .setting-item {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding: 10px 0; padding: 10px 0;
/* border-bottom: 1px solid #eee; */ /* border-bottom: 1px solid #eee; */
} }
.setting-item:last-child { .setting-item:last-child {
border-bottom: none; border-bottom: none;
} }
.setting-item label { .setting-item label {
font-weight: 500; font-weight: 500;
margin-bottom: 5px; margin-bottom: 5px;
display: block; display: block;
} }
.setting-item p, .setting-item p,
.setting-item a { .setting-item a {
font-size: 0.9em; font-size: 0.9em;
font-weight: 300; font-weight: 300;
/* color: #666; */ /* color: #666; */
opacity: 0.6; opacity: 0.6;
margin-bottom: 0; margin-bottom: 0;
} }
a { a {
font-weight: 500 !important; font-weight: 500 !important;
} }
.setting-item-content { .setting-item-content {
display: flex; display: flex;
align-items: center; align-items: center;
} }
input[type="text"], input[type="text"],
select, select,
input[type="number"] { input[type="number"] {
width: 250px; width: 250px;
padding: 5px; padding: 5px;
margin: 10px 0px; margin: 10px 0px;
padding: 10px 10px; padding: 10px 10px;
background-color: #ffffff05; background-color: #ffffff05;
border-width: 0px; border-width: 0px;
color: white; color: white;
border-radius: 0.5em; border-radius: 0.5em;
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
} }
#widget-url:hover { #widget-url:hover {
cursor: pointer; cursor: pointer;
} }
.setting-item-content option { .setting-item-content option {
color: black; color: black;
} }
textarea:focus, textarea:focus,
input:focus { input:focus {
outline: none; outline: none;
} }
.setting-item-content input[type="color"] { .setting-item-content input[type="color"] {
width: 40px; width: 40px;
height: 40px; height: 40px;
margin-left: 10px; margin-left: 10px;
/* padding: 2px; */ /* padding: 2px; */
/* border: 1px solid #ccc; */ /* border: 1px solid #ccc; */
/* border-radius: 4px; */ /* border-radius: 4px; */
appearance: none; appearance: none;
-moz-appearance: none; -moz-appearance: none;
-webkit-appearance: none; -webkit-appearance: none;
background: none; background: none;
border: 0; border: 0;
cursor: pointer; cursor: pointer;
padding: 0; padding: 0;
} }
/* Switch styling */ /* Switch styling */
.switch { .switch {
position: relative; position: relative;
display: inline-block; display: inline-block;
width: 60px; width: 60px;
height: 34px; height: 34px;
} }
.switch input { .switch input {
opacity: 0; opacity: 0;
width: 0; width: 0;
height: 0; height: 0;
} }
.slider { .slider {
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
top: 0; top: 0;
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
background-color: #ccc; background-color: #ccc;
-webkit-transition: .4s; -webkit-transition: .4s;
transition: .4s; transition: .4s;
} }
.slider:before { .slider:before {
position: absolute; position: absolute;
content: ""; content: "";
height: 26px; height: 26px;
width: 26px; width: 26px;
left: 4px; left: 4px;
bottom: 4px; bottom: 4px;
background-color: white; background-color: white;
-webkit-transition: .4s; -webkit-transition: .4s;
transition: .4s; transition: .4s;
} }
input:checked+.slider { input:checked+.slider {
background-color: #2196F3; background-color: #2196F3;
} }
input:focus+.slider { input:focus+.slider {
box-shadow: 0 0 1px #2196F3; box-shadow: 0 0 1px #2196F3;
} }
input:checked+.slider:before { input:checked+.slider:before {
-webkit-transform: translateX(26px); -webkit-transform: translateX(26px);
-ms-transform: translateX(26px); -ms-transform: translateX(26px);
transform: translateX(26px); transform: translateX(26px);
} }
/* Rounded sliders */ /* Rounded sliders */
.slider.round { .slider.round {
border-radius: 34px; border-radius: 34px;
} }
.slider.round:before { .slider.round:before {
border-radius: 50%; border-radius: 50%;
} }
button { button {
font-weight: 500; font-weight: 500;
background-color: #2e2e2e; background-color: #2e2e2e;
color: white; color: white;
opacity: 0.8; opacity: 0.8;
margin: 5px 0px; margin: 5px 0px;
border-width: 0; border-width: 0;
border-radius: 0.5em; border-radius: 0.5em;
padding: 10px 20px; padding: 10px 20px;
width: 100%; width: 100%;
transition: all 0.2s ease; transition: all 0.2s ease;
} }
button:hover { button:hover {
opacity: 1; opacity: 1;
cursor: pointer; cursor: pointer;
} }
#mommy-milkers { #mommy-milkers {
visibility: hidden; visibility: hidden;
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
background: #181818af; background: #181818af;
backdrop-filter: blur(10px); /* Adjust blur radius as needed */ backdrop-filter: blur(10px); /* Adjust blur radius as needed */
z-index: 9999; /* Ensure it's on top */ z-index: 9999; /* Ensure it's on top */
/* Add any other styles for the overlay content */ /* Add any other styles for the overlay content */
transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out;
opacity: 0; opacity: 0;
} }
#load-url { #load-url {
width: 100%; width: 100%;
} }
#load-settings-container { #load-settings-container {
position: fixed; position: fixed;
left: 50%; left: 50%;
top: 50%; top: 50%;
width: calc(100% - 75px); width: calc(100% - 75px);
border-radius: 0.5em; border-radius: 0.5em;
padding: 1em; padding: 1em;
box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.5); box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.5);
background: #181818af; background: #181818af;
/* background: rgba(255, 0, 0, 0.637); */ /* background: rgba(255, 0, 0, 0.637); */
backdrop-filter: blur(10px); backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
} }
#load-settings { #load-settings {
background-color: #2196F3; background-color: #2196F3;
} }
+1 -1
View File
@@ -1,5 +1,5 @@
let settingsContainer = document.getElementById('settings-container'); let settingsContainer = document.getElementById('settings-container');
settingsContainer.src = `../../widget-customizer?settingsJson=${window.location.href}/settings.json` settingsContainer.src = `../../.utilities/settings-page-builder?settingsJson=${window.location.href}/settings.json`
console.log(settingsContainer.src); console.log(settingsContainer.src);
function reloadWidget(data) { function reloadWidget(data) {
+1 -1
View File
@@ -1,5 +1,5 @@
let settingsContainer = document.getElementById('settings-container'); let settingsContainer = document.getElementById('settings-container');
settingsContainer.src = `../../widget-customizer?settingsJson=${window.location.href}/settings.json` settingsContainer.src = `../../.utilities/settings-page-builder?settingsJson=${window.location.href}/settings.json`
console.log(settingsContainer.src); console.log(settingsContainer.src);
function reloadWidget(data) { function reloadWidget(data) {