Skip to content

Instantly share code, notes, and snippets.

@ikenfin
Created November 6, 2020 23:37
Show Gist options
  • Save ikenfin/cdadf45839afae703dcf7b6355cae5f6 to your computer and use it in GitHub Desktop.
Save ikenfin/cdadf45839afae703dcf7b6355cae5f6 to your computer and use it in GitHub Desktop.
Bookmarklet to show borders for divs
javascript:if(!window.__debug_div_borders_inited) { var sheet = document.styleSheets[0]; sheet.insertRule('body.__debug_div_borders div { outline: 1px solid green; }', ((sheet.cssRules && sheet.cssRules.length) || 0)); window.__debug_div_borders_inited = true; } document.body.classList.toggle('__debug_div_borders');void(0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment