Skip to content

Instantly share code, notes, and snippets.

@nanake
Last active October 21, 2016 05:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nanake/b8ca3bea7e56e20bc2be5fbf2aff0569 to your computer and use it in GitHub Desktop.
Save nanake/b8ca3bea7e56e20bc2be5fbf2aff0569 to your computer and use it in GitHub Desktop.
Remove grayscale on websites
for (var element of document.querySelectorAll("html body div img video".split(" "))) {
window.getComputedStyle(element, null)
.getPropertyValue("filter")
.startsWith("grayscale") &&
element.style.setProperty("filter", "none", "important")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment