Created
May 10, 2019 09:16
-
-
Save danielt69/00ebc2dfb1344f56a42b6f28f2d14ec5 to your computer and use it in GitHub Desktop.
hide wp admin bar in iframe
This file contains 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
window.addEventListener('DOMContentLoaded', (event) => { | |
if (window != top) { | |
document.getElementsByTagName("html")[0].setAttribute('style', "margin-top: 0 !important"); | |
document.getElementById("wpadminbar").remove(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment