🌓

Dark Mode

Javascript Bookmarklet

Star
DarkMode : Bookmarklet - Drag

About

Convert most website to Dark Mode using just book mark. Drag Above Button To Bookmark bar. Select this bookmark on any website to change it to dark mode. *Some Browsers Don't Support JS Bookmarks.

Code

Copy & Add manually:

javascript:(function(){function invert(o,t){var r=o.split("("),n=r[1].split(")")[0].split(",");return n.forEach(function(o,r){r<3&&(n[r]="color"==t&&255-parseInt(o)<50?120:255-parseInt(o))}),n=n.join(","),r[0]+"("+n+")"}document.querySelectorAll("*:not([invTouch])").forEach(function(o){var t=window.getComputedStyle(o);o.style.backgroundColor=invert(t.backgroundColor,"back"),o.style.color=invert(t.color,"color"),o.setAttribute("invTouch","true")});})();



Exact code