invidious-experimenting/src/invidious/helpers
psvenk f54fbd057e Add prefers-color-scheme support (#601)
* Add prefers-color-scheme support

This should fix <https://github.com/omarroth/invidious/issues/559>.
The cookie storage format has been changed from boolean
("true"/"false") to tri-state ("dark"/"light"/""), so that users
without a cookie set will get dark mode if they have enabled the dark
theme in their operating system. The code for handling the cookie
state, along with the user's operating system theme, has been factored
out into a new function `update_mode`, which is called both at window
load and at the "storage" event listener, because the "storage" event
listener is only trigerred when a change is made to the localStorage
from another tab/window (for more info - see
<https://stackoverflow.com/a/4679754>).
2019-08-15 11:29:55 -05:00
..
handlers.cr Format Crystal files 2019-08-14 23:31:07 +02:00
helpers.cr Add prefers-color-scheme support (#601) 2019-08-15 11:29:55 -05:00
i18n.cr Translate value for 'familyFriendly' 2019-04-28 14:56:06 -05:00
jobs.cr Attempt to optimize query for subscription feed 2019-07-07 14:00:42 -05:00
json_filter.cr Implement "fields" parameter from the YouTube Data API (#429) 2019-03-30 20:18:34 -05:00
logger.cr Add support for log levels 2019-06-07 21:13:50 -05:00
macros.cr Add support for partial POST to '/api/v1/auth/preferences' 2019-05-30 19:00:38 -05:00
patch_mapping.cr Add prefers-color-scheme support (#601) 2019-08-15 11:29:55 -05:00
proxy.cr Format Crystal files 2019-08-14 23:31:07 +02:00
signatures.cr Automatically migrate database 2019-04-10 16:23:37 -05:00
static_file_handler.cr Fix typo in StaticFileHandler 2019-06-23 15:41:44 -05:00
tokens.cr Fix warnings in Crystal 0.29 2019-06-07 21:13:50 -05:00
utils.cr Add prefers-color-scheme support (#601) 2019-08-15 11:29:55 -05:00