Skip to content

Instantly share code, notes, and snippets.

Created December 2, 2014 15:11
Show Gist options
  • Save anonymous/c5e5b5350b43a1233940 to your computer and use it in GitHub Desktop.
Save anonymous/c5e5b5350b43a1233940 to your computer and use it in GitHub Desktop.
Fix to General.js to stop kdmd.qedgroupllc.com from breaking.
// 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