aboutsummaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authorBobby <[email protected]>2023-07-05 14:54:47 -0400
committerBobby <[email protected]>2023-07-05 14:54:47 -0400
commiteca008f83280b5d181589f33d1b0245adbee2cdb (patch)
treeab5263c4c3f036d0e42c20cc3fc3b96ed0d10d05 /static
parent770676c6f0a1711492969af97d0ebeed551540b5 (diff)
downloadthatcomputerscientist-eca008f83280b5d181589f33d1b0245adbee2cdb.tar.xz
thatcomputerscientist-eca008f83280b5d181589f33d1b0245adbee2cdb.zip
Focus and Spectacles Persist. Selection BG Change
Diffstat (limited to 'static')
-rw-r--r--static/css/styles.css8
-rw-r--r--static/js/postHandler.js16
2 files changed, 24 insertions, 0 deletions
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