// URL of the JSON file containing the script URLs
const jsonUrl = 'https://raw.githubusercontent.com/Shopgenie-Web/body-end-master-script/main/script-list.json';
// Function to fetch and load scripts
function fetchAndLoadScripts() {
fetch(jsonUrl)
.then(response => response.json())
.then(data => {
const scriptUrls = data.scripts;
// Load and execute each script from the JSON file
scriptUrls.forEach(loadAndExecuteScript);
})
.catch(error => console.error('Error loading JSON:', error));
}
// Ensure the master script runs after the DOM is fully loaded
document.addEventListener("DOMContentLoaded", fetchAndLoadScripts);