Skip to content

Instantly share code, notes, and snippets.

View cweems's full-sized avatar

Charlie Weems cweems

View GitHub Profile
@cweems
cweems / General.js
Last active August 29, 2015 14:10 — forked from anonymous/General.js
// 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))