Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9706

Where Facebook web keeps dark/light mode settings?

$
0
0

I want to manipulate dark mode in the latest Facebook (web) design via script. I tried to inspect code and everything is encoded. I found out that the FB adds "__fb-dark-mode" class in <html> tag if dark mode is enabled. BUT, I can't manipulate that because it's not a right way, somewhere in the settings dark mode will not be enabled. So, I tried to track cookies, localstorage... and there is nothing, nothing changes when I toggle dark mode. Where FB keeps settings which mode I am using?? My idea is to manipulate those settings in order to enable/disable dark mode.

Also, I tried to toggle that button in the menu, but I can't because FB clears whole div when focus is lost. Even if don't, when I toggle that button via jQuery nothing changes on the front-end.

Any ideas?

fb dark mode toggle


Viewing all articles
Browse latest Browse all 9706

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>