Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I set-up theme for 'view-source' in Chrome?

I installed theme for Developers Tools and want also make my 'view-source' is dark too.

like image 589
Vitaly Zdanevich Avatar asked Aug 28 '14 10:08

Vitaly Zdanevich


People also ask

Can you add a custom theme to chrome?

Download and add a Chrome themeOn your computer, open Chrome. Settings. Under "Appearance," click Themes. You can also go to the gallery by visiting Chrome Web Store Themes.

Which chrome theme is good for eyes?

Green Eye Green Eye is a simple and efficient Google Chrome extension that keeps your eyes healthy by changing the background and foreground colors of web pages. It comes with three preset themes, but you can personalize it even more by choosing the text, background, and border color.

How do you change the Inspect Element theme?

Once the developers tools are shown, go to the top corner of the menu (on the expand button) and choose settings (or press F1 directly if the developers tools is visible). Then choose the Theme option in the Appearance area. Finally, enjoy while you code in the night !

How do I force dark mode on a specific website?

To find it, type “chrome://flags” into Chrome's Omnibox and press Enter. Search for “dark mode” in the search box at the top of the Experiments page that appears. Click the box to the right of “Auto Dark Mode for Web Contents” and select “Enabled” for the default setting. Click “Relaunch” to relaunch Chrome.


2 Answers

Create bookmark with code below:

javascript:(function(){ var h=document.getElementsByTagName('head')[0],s=document.createElement('style');s.setAttribute('type','text/css'); s.appendChild(document.createTextNode('html{-webkit-filter:invert(100%) hue-rotate(180deg) contrast(70%) !important; background: #fff;} .line-content {background-color: #fefefe;}'));h.appendChild(s); })()

And click on this bookmark on any page you want to be dark

like image 52
Andrey Izman Avatar answered Oct 23 '22 04:10

Andrey Izman


The only real way to do this is I found is the #enable-force-dark experimental flag. The downside is that it sets a dark theme on every single page you browser like Dark Reader or Deluminate.

  1. Enable the #enable-force-dark experimental flag at chrome://flags/#enable-force-dark. Screenshot
  2. Done. Now the view-source pages are automatically dark.
like image 38
Miley Virus Avatar answered Oct 23 '22 05:10

Miley Virus