Update TGBeta.ps1
This commit is contained in:
24
TGBeta.ps1
24
TGBeta.ps1
@@ -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);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user