Created
September 12, 2013 06:54
-
-
Save mojaray2k/6533788 to your computer and use it in GitHub Desktop.
Some sites like StumbleUpon and LinkedIn show your site with their bar on top of the page. This is done by including your page in an iframe. You only need to compare the window object of your page, to window.top. Normally, they are the same object, but if your site is being show in an iframe, they will differ. Then you simply re-direct the brows…
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
//no-iframe.js | |
if(window != window.top){ | |
window.top.location = window.location; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment