Skip to content

Instantly share code, notes, and snippets.

@tinacious
Last active August 23, 2024 22:43
Show Gist options
  • Save tinacious/b19d6b9abe90d49d93085dff290c9383 to your computer and use it in GitHub Desktop.
Save tinacious/b19d6b9abe90d49d93085dff290c9383 to your computer and use it in GitHub Desktop.
Quick && Dirty dark mode
// ==UserScript==
// @name Quick && Dirty dark mode
// @match https://leetcode.com/problems/*
// @grant none
// @version 1.0
// @author -
// @description 8/23/2024, 6:30:35 PM
// ==/UserScript==
document.body.style.filter = 'invert(1)'
setTimeout(uninvertImages, 500)
setTimeout(uninvertImages, 1000)
setTimeout(uninvertImages, 3000)
function uninvertImages() {
document.querySelectorAll('img').forEach((element) => {
element.style.filter = 'invert(1)'
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment