Created
November 13, 2010 19:44
-
-
Save ralphholzmann/675575 to your computer and use it in GitHub Desktop.
Modernizr tests to detect if you're in an iframe or facebook 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
Modernizr | |
.addTest('iframe', function() { | |
return window.top.location != window.location; | |
}) | |
.addTest('facebook', function() { | |
return !! ~ location.href.indexOf( 'fb_sig_in_iframe=1' ); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment