Skip to content

Instantly share code, notes, and snippets.

@GingerBear
Last active May 10, 2017 16:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GingerBear/e6c2ed277b93d464a8efbc06d232cf22 to your computer and use it in GitHub Desktop.
Save GingerBear/e6c2ed277b93d464a8efbc06d232cf22 to your computer and use it in GitHub Desktop.
inject css to hide elements
function injectCSS(css) {
var style = document.createElement('style');
style.innerHTML = css;
document.head.appendChild(style);
}
document.addEventListener('DOMContentLoaded', function() {
injectCSS('.header-widget {display: none}')
}, false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment