Can I customize the theme for "view-source" in Chrome?

I installed the theme for Developers Tools and want my "view source" to be dark too.

+6
source share
2 answers

Create a bookmark with the 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 where you want to be dark.

+4
source

There are several syntax extensions for chrome. For example: Sight and Syntaxtic! .

But honestly, the result was not always expected, because those applications that rely on urls with the extension (.js, .php, etc.) load the corresponding token. Nowadays, most websites use URL rewriting, so there is no extension, so apps don’t load the token. Perhaps this can be changed in the application manifest, but I have not yet touched on this.

0
source

Source: https://habr.com/ru/post/974468/


All Articles