Last active
May 25, 2022 20:13
-
-
Save StackTrac3/ffd4c447580f72b3d1e8188a84955aa5 to your computer and use it in GitHub Desktop.
Greasemonkey script for darkening your web browser
This file contains hidden or 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
// ==UserScript== | |
// @name Webkit's filter may globally dim | |
// @description web pages in a pleasing manner | |
// @grant GM_addStyle | |
// @run-at document-end | |
// @exclude *://*.github.com/* | |
// @exclude *://github.com/* | |
// ==/UserScript== | |
function addStyle(css) { | |
var head = document.getElementsByTagName("head")[0] | |
if (!head) return | |
var style = document.createElement("style") | |
style.innerHTML = css | |
head.appendChild(style) | |
} | |
addStyle( | |
"html { filter: brightness(70%); -webkit-filter: brightness(70%); -moz-filter: brightness(70%); }" | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment