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