Last active
May 10, 2017 16:48
-
-
Save GingerBear/e6c2ed277b93d464a8efbc06d232cf22 to your computer and use it in GitHub Desktop.
inject css to hide elements
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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