How to enable the secret Youtube Dark Mode in Chrome

So YouTube has a slick secret feature that let’s you change everything into a Dark Mode.  It’s currently not published by Google and only a few people know about it but it’s also awesome because it makes it easier to view the Youtube site (especially late at night when your eyes are already tired)

This shiz is awesome – let me show you how it works.

1. Check your Chrome version

The first thing you need to do is to make sure you are at Chrome version 57.  Go ahead and pop this into the Chrome omnibar:

chrome://help

Google Chrome version

2. Pop open developer tools

Now we need to open the Chrome developer tools so we can add a secret cookie value to your browser.  Press:

Ctrl + Shift + i

Click the Console tab

Chrome developer tools

Set the Youtube Cookie

Now we need to enter some data:

var cookieDate = new Date(); cookieDate.setFullYear(cookieDate.getFullYear( ) + 1); document.cookie="VISITOR_INFO1_LIVE=fPQ4jCL6EiE; expires=" + cookieDate.toGMTString( ) + "; path=/";

We’re creating a new JavaScript data object, from the Date class, and we’re naming it cookieDate.  Next, we take need to set the cookie expiration date.  In other words, we need to tell the browser when this cookie will become invalid and no longer work.

We can use the setFullYear() method to achieve this task.  Here, I’m passing the current year to the cookieDate object after adding 1 to it.  I’m setting the cookie to expire next year.

Next, we set the special cookie that will give us dark mode in Youtube:

document.cookie="VISITOR_INFO1_LIVE=fPQ4jCL6EiE;

We tak on the expiration date and set the path to “/” which indicates the root directory of the site.  I want the cookie to apply to youtube.com and all subdomains so that’s why I put in that forward slash.

Console Panel

Alright, press Enter.

Enjoy Dark Mode

Now press Ctrl + Shift + i again to close the console pane, refresh the page and you should notice that the Youtube homepage is now displayed in a svelte new dark mode.

What to do if Dark Mode isn’t working?

If it isn’t showing up for you, click your profile icon in the upper right corner to see an option to toggle Dark Mode on.

Dark Mode in Youtube

If you don’t even have this menu under your profile you may need to delete the old Youtube cookie first before adding this new one.

Go back into Developer Mode (Ctrl + Shift + i), then click the Applications tab in Developer Tools.  In the graphic below you can see it’s underlined with a light-blue line.

Then in the left pane, expand “Cookies”, click on “https://www.youtube.com” and then in right pane, right click the VISITOR_INFO1_LIVE cookie and click Delete.

Manually deleting the Youtube cookie

Now all you need to do is to click the Console tab, paste in:

var cookieDate = new Date(); cookieDate.setFullYear(cookieDate.getFullYear( ) + 1); document.cookie="VISITOR_INFO1_LIVE=fPQ4jCL6EiE; expires=" + cookieDate.toGMTString( ) + "; path=/";

Press Enter, Refresh and bam! You should be good!

Dark Mode in Google Chrome

I hope this helps!

By the way, you can also do this in Microsoft Edge:

Dark Mode in Microsoft Edge

Press F12 to pop open the Developer Tools.

Now click The Debugger tab, find the Cookies section in the left pane, expand www.youtube.com and then double click in the VISITOR_INFO1_LIVE value cell to replace the value there with

fPQ4jCL6EiE

Microsoft Edge Developer Tools

 

About

Connect with Vonnie on Twitter

Posted in Google Chrome, Web Browsers, Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Vista, Windows XP
  • ps29

    Thank you it worked for me! This new theme is lifesaver for night time viewing.

  • Skygazer

    Awesome! Thanks!