Skip to content

Instantly share code, notes, and snippets.

@cweems
Forked from anonymous/General.js
Last active August 29, 2015 14:10
Show Gist options
  • Save cweems/bac656923ebf821b4050 to your computer and use it in GitHub Desktop.
Save cweems/bac656923ebf821b4050 to your computer and use it in GitHub Desktop.
// break out of frames to avoid cross-frame scripting as per security compliance report 7/2014
if (top.frames.length!=0)
{
// Prevent modals from breaking on KDMD site.
if(document.referrer.indexOf("kdmd.qedgroupllc.com") > 0)
{
return;
}
//Only break out if the iframe is cross-domain to avoid breaking our own modals
else(!(document.referrer.indexOf(self.document.location.protocol + "//" + self.document.location.host) === 0))
{
top.location=self.document.location;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment