Update TGBeta.ps1

This commit is contained in:
2025-01-27 22:37:26 -05:00
parent 21975f7ecc
commit dca136890b

View File

@@ -749,9 +749,23 @@ function GetHtmlContent {
Set Edge Default Search Engine Set Edge Default Search Engine
</label> </label>
<label> <label>
<input type="checkbox" name="setWindowsPerformance" id="setWindowsPerformanceCheckbox"> <input type="checkbox" name="setWindowsPerformance" id="setWindowsPerformanceCheckbox" onclick="toggleRadioButtons(this)">
Optimize Windows Performance Optimize Windows Performance
</label> </label>
<div class="radio-group" id="windowsPerformanceOptions" style="margin-left: 20px; display: none;">
<label>
<input type="radio" name="optimizeWindowsPerformanceLevel" value="full">
Full
</label>
<label>
<input type="radio" name="optimizeWindowsPerformanceLevel" value="partial">
Partial
</label>
<label>
<input type="radio" name="optimizeWindowsPerformanceLevel" value="none" checked>
None
</label>
</div>
<label> <label>
<input type="checkbox" name="stopUnnecessaryServices" id="stopUnnecessaryServicesCheckbox"> <input type="checkbox" name="stopUnnecessaryServices" id="stopUnnecessaryServicesCheckbox">
Stop Unnecessary Services Stop Unnecessary Services
@@ -797,7 +811,8 @@ function GetHtmlContent {
<div class="button-group"> <div class="button-group">
<button class="install-button" onclick="triggerTweaks()">Apply Tweaks</button> <button class="install-button" onclick="triggerTweaks()">Apply Tweaks</button>
</div> </div>
</div> </div>
<!-- Shared Exit Button --> <!-- Shared Exit Button -->
<div class="button-group"> <div class="button-group">
@@ -939,14 +954,19 @@ function GetHtmlContent {
}); });
} }
function updateSelectAllTweaks() { function toggleRadioButtons(checkbox) {
const selectAllCheckbox = document.getElementById('selectAllTweaksCheckbox'); const radioGroup = document.getElementById("windowsPerformanceOptions");
const checkboxes = document if (checkbox.checked) {
.getElementById('tweaksTab') radioGroup.style.display = "block";
.querySelectorAll('input[type="checkbox"]:not(#selectAllTweaksCheckbox)'); } else {
radioGroup.style.display = "none";
// If any checkbox is unchecked, uncheck "Select All" // Optionally, reset the radio buttons to their default state
selectAllCheckbox.checked = Array.from(checkboxes).every(checkbox => checkbox.checked); const radios = radioGroup.querySelectorAll('input[type="radio"]');
radios.forEach(radio => {
radio.checked = false;
});
radios[2].checked = true; // Reset to "None"
}
} }
// Attach the updateSelectAllTweaks function to all individual checkboxes // Attach the updateSelectAllTweaks function to all individual checkboxes