WinBox is nice, but it has this annoying bug that I don't feel like figuring out how to fix. JSFrame seems to work much better, although centering the window seems to be a chore. I'll figure it out soon enough. Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
30 lines
616 B
HTML
30 lines
616 B
HTML
{% extends "board/base.html" %}
|
|
{% load i18n %}
|
|
|
|
{% block content %}
|
|
{% blocktranslate %}
|
|
Post created. Closing window in {{window_timeout}} second(s).
|
|
{% endblocktranslate %}
|
|
|
|
<script>
|
|
function isIframe() {
|
|
try {
|
|
return window.self !== window.top;
|
|
} catch (_) {
|
|
return true;
|
|
}
|
|
}
|
|
|
|
setTimeout(function() {
|
|
if(isIframe()) {
|
|
// check for possible windows
|
|
let replyWindow = getReplyWindow();
|
|
if(replyWindow) {
|
|
replyWindow.closeFrame();
|
|
}
|
|
} else {
|
|
window.close();
|
|
}
|
|
}, 1000 * {{window_timeout}});
|
|
</script>
|
|
{% endblock content %} |