diff options
| author | Bobby <[email protected]> | 2023-07-05 14:54:47 -0400 |
|---|---|---|
| committer | Bobby <[email protected]> | 2023-07-05 14:54:47 -0400 |
| commit | eca008f83280b5d181589f33d1b0245adbee2cdb (patch) | |
| tree | ab5263c4c3f036d0e42c20cc3fc3b96ed0d10d05 /static/js/postHandler.js | |
| parent | 770676c6f0a1711492969af97d0ebeed551540b5 (diff) | |
| download | thatcomputerscientist-eca008f83280b5d181589f33d1b0245adbee2cdb.tar.xz thatcomputerscientist-eca008f83280b5d181589f33d1b0245adbee2cdb.zip | |
Focus and Spectacles Persist. Selection BG Change
Diffstat (limited to 'static/js/postHandler.js')
| -rw-r--r-- | static/js/postHandler.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/static/js/postHandler.js b/static/js/postHandler.js index 77f7b10a..4058deca 100644 --- a/static/js/postHandler.js +++ b/static/js/postHandler.js @@ -48,6 +48,7 @@ function lightsOff() { } $('#lightsStatus').attr('data-status', 'off'); $('#lightsStatus').attr('src', offImage); + localStorage.setItem('lights', 'off'); } else { $('#overlay').fadeTo('fast', 0.9); if (windowWidth > 480) { @@ -57,6 +58,7 @@ function lightsOff() { } $('#lightsStatus').attr('data-status', 'on'); $('#lightsStatus').attr('src', onImage); + localStorage.setItem('lights', 'on'); } } @@ -101,11 +103,25 @@ function blindMode() { // if localStorage has blindMode set to on, then turn on blindMode var blindModeStatus = localStorage.getItem('blindMode'); +var lightsStatus = localStorage.getItem('lights'); +if (!blindModeStatus) { + localStorage.setItem('blindMode', 'on'); + blindModeStatus = 'on'; +} if (blindModeStatus == 'on') { blindMode(); } +if (!lightsStatus) { + localStorage.setItem('lights', 'off'); + lightsStatus = 'off'; +} + +if (lightsStatus == 'on') { + lightsOff(); +} + var allInputElementsOnPage = $('input'); // If lights are off, then on hover on sidebar .children(), fadeTo 1 for currently hovered child |
