From eca008f83280b5d181589f33d1b0245adbee2cdb Mon Sep 17 00:00:00 2001 From: Bobby Date: Wed, 5 Jul 2023 14:54:47 -0400 Subject: Focus and Spectacles Persist. Selection BG Change --- static/css/styles.css | 8 ++++++++ static/js/postHandler.js | 16 ++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/static/css/styles.css b/static/css/styles.css index ceefb21d..d208597d 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -23,6 +23,14 @@ body { background-size: 30%; } +::-moz-selection { /* Code for Firefox */ + background: #311b4f; +} + +::selection { + background: #311b4f; +} + font:hover, .VIpgJd-yAWNEb-VIpgJd-fmcmS-sn54Q { background: none !important; box-shadow: none !important; 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 -- cgit v1.2.3