Last active
September 27, 2016 06:31
-
-
Save clupasq/de57e966a18e072c454da1b60337f102 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
var styleId = 'invert-style'; | |
var style = document.getElementById(styleId); | |
if (style) { | |
style.parentElement.removeChild(style); | |
} else { | |
style = document.createElement('style'); | |
style.id = styleId; | |
style.textContent = '' + | |
'html,img, video, object, [style*=url] {' + | |
'-webkit-filter:invert(100%) !important;' + | |
'filter:invert(100%) !important;' + | |
'}' + | |
'' + | |
'body {' + | |
'background:black;' + | |
'}'; | |
document.body.appendChild(style); | |
} | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment