Created
July 16, 2011 16:43
-
-
Save davidalexander/1086531 to your computer and use it in GitHub Desktop.
Add a class to the html tag if the page is being loaded in an iframe
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
if (window.location !== window.parent.location) { | |
document.documentElement.className += ' iframe'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment