cross_framing_protection.js 419 B

123456789101112131415
  1. "use strict";
  2. /**
  3. * Conditionally included if framing is not allowed
  4. */
  5. if (self === top) {
  6. var styleElement = document.getElementById('cfs-style'); // check if styleElement has already been removed
  7. // to avoid frequently reported js error
  8. if (typeof styleElement !== 'undefined' && styleElement !== null) {
  9. styleElement.parentNode.removeChild(styleElement);
  10. }
  11. } else {
  12. top.location = self.location;
  13. }