Skip to content

Instantly share code, notes, and snippets.

@davidalexander
Created July 16, 2011 16:43
Show Gist options
  • Save davidalexander/1086531 to your computer and use it in GitHub Desktop.
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
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