(the parent // may define hear_me only after its own scripts load). window.hrShowCloseBarIfFramed = function () { try { if (self != parent) { null == self.opener && self.parent.hear_me(); document.documentElement.classList.add("hr-framed"); } } catch (e) { } }; hrShowCloseBarIfFramed();