Update TGBeta.ps1

This commit is contained in:
2025-01-05 21:27:41 -05:00
parent 4f4be47514
commit 0946ece3e5

View File

@@ -606,7 +606,7 @@ function GetHtmlContent {
<h2>Tweaks</h2> <h2>Tweaks</h2>
<div class="checkbox-group"> <div class="checkbox-group">
<label> <label>
<input type="checkbox" id="selectAllTweakCheckbox" onclick="toggleTweakCheckboxes(this)"> <input type="checkbox" id="selectAllTweaksCheckbox" onclick="toggleTweaksCheckboxes(this)">
Select All Select All
</label> </label>
<label> <label>
@@ -666,11 +666,11 @@ function GetHtmlContent {
}); });
} }
function toggleTweakCheckboxes(selectAllCheckbox) { function toggleTweaksCheckboxes(selectAllCheckbox) {
// Get all checkboxes inside the tweakTab container // Get all checkboxes inside the tweaksTab container
const checkboxes = document const checkboxes = document
.getElementById('tweakTab') .getElementById('tweaksTab')
.querySelectorAll('input[type="checkbox"]:not(#selectAllTweakCheckbox)'); .querySelectorAll('input[type="checkbox"]:not(#selectAllTweaksCheckbox)');
// Set the checked state of all checkboxes to match the "Select All" checkbox // Set the checked state of all checkboxes to match the "Select All" checkbox
checkboxes.forEach(checkbox => { checkboxes.forEach(checkbox => {
@@ -678,19 +678,19 @@ function GetHtmlContent {
}); });
} }
function updateSelectAllTweak() { function updateSelectAllTweaks() {
const selectAllCheckbox = document.getElementById('selectAllTweakCheckbox'); const selectAllCheckbox = document.getElementById('selectAllTweaksCheckbox');
const checkboxes = document const checkboxes = document
.getElementById('tweakTab') .getElementById('tweaksTab')
.querySelectorAll('input[type="checkbox"]:not(#selectAllTweakCheckbox)'); .querySelectorAll('input[type="checkbox"]:not(#selectAllTweaksCheckbox)');
// If any checkbox is unchecked, uncheck "Select All" // If any checkbox is unchecked, uncheck "Select All"
selectAllCheckbox.checked = Array.from(checkboxes).every(checkbox => checkbox.checked); selectAllCheckbox.checked = Array.from(checkboxes).every(checkbox => checkbox.checked);
} }
// Attach the updateSelectAllTweak function to all individual checkboxes // Attach the updateSelectAllTweaks function to all individual checkboxes
document.querySelectorAll('#tweakTab input[type="checkbox"]:not(#selectAllTweakCheckbox)').forEach(checkbox => { document.querySelectorAll('#tweaksTab input[type="checkbox"]:not(#selectAllTweaksCheckbox)').forEach(checkbox => {
checkbox.addEventListener('change', updateSelectAllTweak); checkbox.addEventListener('change', updateSelectAllTweaks);
}); });