Skip to content

Instantly share code, notes, and snippets.

@micalevisk
Last active October 23, 2020 18:10
Show Gist options
  • Save micalevisk/97321aab224b66b3e7b7f3fd1635bcb9 to your computer and use it in GitHub Desktop.
Save micalevisk/97321aab224b66b3e7b7f3fd1635bcb9 to your computer and use it in GitHub Desktop.
blur visible Visual Studio Code panels (tested on VSC v1.50.1)
// go to Help > Toggle Developer Tools
const toogleInlineStyle = (el, styleProp, styleValue) =>
!!el.style[styleProp] ? (el.style[styleProp]='') : (el.style[styleProp]=styleValue)
const blur = () =>
document.querySelectorAll('[class="monaco-scrollable-element editor-scrollable vs-dark"]')
.forEach(el => toogleInlineStyle(el, 'filter', 'blur(3px)'))
// call `blur` to toggle the blur effect
@micalevisk
Copy link
Author

demo

before

off

after call blur()

on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment