Skip to content

Instantly share code, notes, and snippets.

@danieliser
Last active April 12, 2023 11:11
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save danieliser/59c01eae386c58c0592655d28a3be165 to your computer and use it in GitHub Desktop.
Automatically hide elements on your site if its loaded in an iframe. JavaScript is used to detect when in a frame and add a class to the <html> element. CSS can then be used to hide or show elements.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment