diff --git a/TGBeta.ps1 b/TGBeta.ps1 index 82aeb04..4f61509 100644 --- a/TGBeta.ps1 +++ b/TGBeta.ps1 @@ -912,49 +912,7 @@ function GetHtmlContent { }); - function runSelectedTweaks() { - const tweaks = []; - const tweakCheckboxes = document.querySelectorAll('#tweaksTab input[type="checkbox"]:not(#selectAllTweaksCheckbox)'); - - // Collect selected tweaks - tweakCheckboxes.forEach((checkbox) => { - if (checkbox.checked) { - tweaks.push(checkbox.id); // Use checkbox IDs as identifiers - } - }); - - // Check if no tweaks are selected - if (tweaks.length === 0) { - appendLog("No tweaks selected. Please select at least one tweak to run.", "red"); - return; - } - - appendLog("Running selected tweaks...", "yellow"); - - // Prepare payload - const payload = JSON.stringify({ tweaks }); - - // Use fetch to call the backend - fetch('/runTweaks', { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, - body: payload, - }) - .then((response) => { - if (!response.ok) { - throw new Error(`Failed to run tweaks. Status: ${response.status}`); - } - return response.text(); // Parse response as text - }) - .then((result) => { - appendLog(result, "green"); - }) - .catch((error) => { - appendLog(`Error running tweaks: ${error.message}`, "red"); - }); - } +