blob: c43e7958e6752765a429226e9578f7904db031ca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
/**
* Conditionally included if framing is not allowed.
* @return {void}
*/
window.crossFramingProtection = () => {
if (window.allowThirdPartyFraming) {
return;
}
if (window.self !== window.top) {
window.top.location = window.self.location;
return;
}
const styleElement = document.getElementById('cfs-style');
// check if styleElement has already been removed to avoid frequently reported js error
if (typeof (styleElement) === 'undefined' || styleElement === null) {
return;
}
styleElement.parentNode.removeChild(styleElement);
};
|