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?