combine animation settings into one toggle
All checks were successful
/ build (push) Successful in 26s

This commit is contained in:
Ruben 2025-04-09 22:33:20 -05:00
commit 3442ce1de6
No known key found for this signature in database
GPG key ID: 8EA836555FB6D9A5
6 changed files with 14 additions and 43 deletions

View file

@ -55,15 +55,9 @@
}
/* disable window animations */
:root:has(#disable-window-animations:checked) {
:root:has(#disable-animations:checked) {
.window {
animation: unset !important;
}
}
/* disable focus animations */
:root:has(#disable-focus-animations:checked) {
.window {
transition: unset !important;
}
.window:hover {

View file

@ -124,12 +124,8 @@
<label for="disable-bg">Disable background gradient</label><br>
</span>
<span>
<input type="checkbox" id="disable-window-animations" name="window-animations" />
<label for="disable-window-animations">Disable window animations</label><br>
</span>
<span>
<input type="checkbox" id="disable-focus-animations" name="focus-animations" />
<label for="disable-focus-animations">Disable focus animations</label><br>
<input type="checkbox" id="disable-animations" name="disable-animations" />
<label for="disable-animations">Disable animations</label><br>
</span>
<span>
<input type="checkbox" id="disable-alttext" name="disable-alttext" />

View file

@ -125,12 +125,8 @@
<label for="disable-bg">Disable background gradient</label><br>
</span>
<span>
<input type="checkbox" id="disable-window-animations" name="window-animations" />
<label for="disable-window-animations">Disable window animations</label><br>
</span>
<span>
<input type="checkbox" id="disable-focus-animations" name="focus-animations" />
<label for="disable-focus-animations">Disable focus animations</label><br>
<input type="checkbox" id="disable-animations" name="disable-animations" />
<label for="disable-animations">Disable animations</label><br>
</span>
<span>
<input type="checkbox" id="disable-alttext" name="disable-alttext" />

View file

@ -126,12 +126,8 @@
<label for="disable-bg">Disable background gradient</label><br>
</span>
<span>
<input type="checkbox" id="disable-window-animations" name="window-animations" />
<label for="disable-window-animations">Disable window animations</label><br>
</span>
<span>
<input type="checkbox" id="disable-focus-animations" name="focus-animations" />
<label for="disable-focus-animations">Disable focus animations</label><br>
<input type="checkbox" id="disable-animations" name="disable-animations" />
<label for="disable-animations">Disable animations</label><br>
</span>
<span>
<input type="checkbox" id="disable-alttext" name="disable-alttext" />

View file

@ -124,12 +124,8 @@
<label for="disable-bg">Disable background gradient</label><br>
</span>
<span>
<input type="checkbox" id="disable-window-animations" name="window-animations" />
<label for="disable-window-animations">Disable window animations</label><br>
</span>
<span>
<input type="checkbox" id="disable-focus-animations" name="focus-animations" />
<label for="disable-focus-animations">Disable focus animations</label><br>
<input type="checkbox" id="disable-animations" name="disable-animations" />
<label for="disable-animations">Disable animations</label><br>
</span>
<span>
<input type="checkbox" id="disable-alttext" name="disable-alttext" />

View file

@ -4,8 +4,7 @@ document.addEventListener('DOMContentLoaded', function() {
const themeInputs = document.querySelectorAll('input[name="theme-setting"]');
const uncapitalizationCheckbox = document.getElementById('uncapitalization');
const disableBgCheckbox = document.getElementById('disable-bg');
const disableWindowAnimationsCheckbox = document.getElementById('disable-window-animations');
const disableFocusAnimationsCheckbox = document.getElementById('disable-focus-animations');
const disableAnimationsCheckbox = document.getElementById('disable-animations');
const disableAlttextCheckbox = document.getElementById('disable-alttext');
// load saved settings
@ -26,8 +25,7 @@ document.addEventListener('DOMContentLoaded', function() {
uncapitalizationCheckbox.addEventListener('change', saveSettings);
disableBgCheckbox.addEventListener('change', saveSettings);
disableWindowAnimationsCheckbox.addEventListener('change', saveSettings);
disableFocusAnimationsCheckbox.addEventListener('change', saveSettings);
disableAnimationsCheckbox.addEventListener('change', saveSettings);
disableAlttextCheckbox.addEventListener('change', saveSettings);
// settings saving function
@ -43,8 +41,7 @@ document.addEventListener('DOMContentLoaded', function() {
// save toggle states
localStorage.setItem('accessibility-uncapitalization', uncapitalizationCheckbox.checked);
localStorage.setItem('accessibility-disable-bg', disableBgCheckbox.checked);
localStorage.setItem('accessibility-disable-window-animations', disableWindowAnimationsCheckbox.checked);
localStorage.setItem('accessibility-disable-focus-animations', disableFocusAnimationsCheckbox.checked);
localStorage.setItem('accessibility-disable-animations', disableAnimationsCheckbox.checked);
localStorage.setItem('accessibility-disable-alttext', disableAlttextCheckbox.checked);
}
@ -72,13 +69,9 @@ document.addEventListener('DOMContentLoaded', function() {
if (localStorage.getItem('accessibility-disable-bg') === 'true') {
disableBgCheckbox.checked = true;
}
if (localStorage.getItem('accessibility-disable-window-animations') === 'true') {
disableWindowAnimationsCheckbox.checked = true;
}
if (localStorage.getItem('accessibility-disable-focus-animations') === 'true') {
disableFocusAnimationsCheckbox.checked = true;
if (localStorage.getItem('accessibility-disable-animations') === 'true') {
disableAnimationsCheckbox.checked = true;
}
if (localStorage.getItem('accessibility-disable-alttext') === 'true') {