1
2
3
4
5
6
7
/*
Oftentimes you want to make sure your site isn't being IFRAME'd.  Sometimes it's for security reasons, other times it's so your site's content isn't being skimmed else, and other times it's...oh, who cares, you just want to do it.  Here's a short way to escape frames:
*/

if (top.location != self.location) {
    top.location = self.location.href;
}