Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
In Chrome clicking "h" key in elements tab of devtools panel should toggle the hide/show
var cssRule = `.__web-inspector-hide-shortcut__, .__web-inspector-hide-shortcut__ * {
display: none !important;
function injectStyleRulejQ(rule, id) {
var div = $("<div />", {
html: '&shy;<style id=' + id + '>' + rule + '</style>'
function injectStyleRule(rule, id) {
var elem = document.createElement('div');
elem.innerHTML = "<style>" + rule + "</style>";; = 'display:none';
injectStyleRule(cssRule, "display-none-shortcut");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.