diff options
Diffstat (limited to 'static/js')
| -rw-r--r-- | static/js/postHandler.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/static/js/postHandler.js b/static/js/postHandler.js index dd647363..186ac64d 100644 --- a/static/js/postHandler.js +++ b/static/js/postHandler.js @@ -78,6 +78,9 @@ function blindMode() { } $('#blindStatus').attr('data-status', 'on'); $('#blindStatus').attr('src', onImage); + + // we will allow blind mode to persist across pages, in local storage + localStorage.setItem('blindMode', 'on'); } else { // turn off. Phones - 12px, Desktop - 11px if (windowWidth < 480) { @@ -91,9 +94,18 @@ function blindMode() { } $('#blindStatus').attr('data-status', 'off'); $('#blindStatus').attr('src', offImage); + + localStorage.setItem('blindMode', 'off'); } } +// if localStorage has blindMode set to on, then turn on blindMode +var blindModeStatus = localStorage.getItem('blindMode'); +console.log(blindModeStatus); +if (blindModeStatus == 'on') { + blindMode(); +} + var allInputElementsOnPage = $('input'); // If lights are off, then on hover on sidebar .children(), fadeTo 1 for currently hovered child |
