@@ -20,7 +24,10 @@ function isIframe() {
setTimeout(function() {
if(isIframe()) {
- window.top.banWindow.close();
+ let banWindow = getBanWindow();
+ if(banWindow) {
+ banWindow.closeFrame();
+ }
} else {
window.close();
}
diff --git a/board/templates/board/post_detail.html b/board/templates/board/post_detail.html
index dd9135f..c1900e7 100644
--- a/board/templates/board/post_detail.html
+++ b/board/templates/board/post_detail.html
@@ -1,6 +1,5 @@
{% extends "board/base.html" %}
-{% load post_body %}
-{% load i18n %}
+{% load i18n post_body static %}
{% block title %}
{% with title=board.url %}
@@ -8,6 +7,10 @@
{% endwith %}
{% endblock title %}
+{% block extrajs %}
+
+{% endblock extrajs %}
+
{% block content %}
{# board header #}
@@ -59,49 +62,13 @@
+{% endblock extrajs %}
{# Body #}
{% block content %}
@@ -20,8 +24,9 @@ function isIframe() {
setTimeout(function() {
if(isIframe()) {
- if(typeof window.top.reportWindow !== "undefined" && window.top.reportWindow) {
- window.top.reportWindow.closeFrame();
+ let reportWindow = getReportWindow();
+ if(reportWindow) {
+ reportWindow.closeFrame();
}
} else {
window.close();