cross_framing_protection.js 471 B

1234567891011121314
  1. /* vim: set expandtab sw=4 ts=4 sts=4: */
  2. /**
  3. * Conditionally included if framing is not allowed
  4. */
  5. if (self === top) {
  6. var style_element = document.getElementById('cfs-style');
  7. // check if style_element has already been removed
  8. // to avoid frequently reported js error
  9. if (typeof(style_element) !== 'undefined' && style_element !== null) {
  10. style_element.parentNode.removeChild(style_element);
  11. }
  12. } else {
  13. top.location = self.location;
  14. }