Skip to content

Instantly share code, notes, and snippets.

@gcpantazis
Created October 23, 2012 18:01
Show Gist options
  • Save gcpantazis/3940373 to your computer and use it in GitHub Desktop.
Save gcpantazis/3940373 to your computer and use it in GitHub Desktop.
Example of In-App Init Prevention.
// In your actual app's JS, do not initialize if site is iframed.
require(['app-global'], function(AppGlobal) {
if ( top !== self ) {
return;
}
// Otherwise
AppGlobal.init();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment