https://www.linkedin.com/mypreferences/d/dark-mode is by default Light. You can change it, but it's a browser cookie, meaning it's not saved across different computers and/or browsers.

Changing it works in real time without refreshing or loading anything external. It seems to use JS from https://static.licdn.com/aero-v1/sc/h/4hny070h7lbdp0wds8kbh1s4 (although the last part might be a dynamic ID) with stuff like e._updateCookie(t.LI_THEME, o === t.THEME.DARK ? t.THEME.DARK : t.THEME.LIGHT)) and e._setCurrentTheme(i).

Is there any way to use Device settings automatically instead of going to that setting every time? Like a bookmarklette that quickly enables it or automatically sets/modifies the cookie li_theme and perhaps also li_theme_set?



1 Answer 1


Other than using a third party tool for this (which isn't covered in this site), it seems the only choice is a quick JavaScript bookmarklet to set the proper cookie and refresh (because the website expected one to do this from the settings' page and not from the homepage).
It only needs to be launched after logging in:

function setDarkMode() {
  if (location.hostname.replace('www.', '') == 'linkedin.com') {
    document.cookie = "li_theme=system; path=/; domain=." + location.hostname + "; secure; SameSite=None";

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.