Skip to content

Instantly share code, notes, and snippets.

@pombadev
Last active May 31, 2017 05:06
Show Gist options
  • Save pombadev/de709bb2fdb4e5861ad08adb6a875ae7 to your computer and use it in GitHub Desktop.
Save pombadev/de709bb2fdb4e5861ad08adb6a875ae7 to your computer and use it in GitHub Desktop.
Dim any website
$('<div id="dim_overlay">')
.css({
'background-color': 'rgba(0, 0, 0, 0.5)', // change the last value to adjust the brightness.
'min-height': '100%',
'min-width': '100%',
'position': 'fixed',
'pointer-events': 'none', // keeps website's functionality intact
'z-index': 999
})
.appendTo(document.body);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment