diff --git a/board/static/board/post.js b/board/static/board/post.js index a19bd3e..391ad5e 100644 --- a/board/static/board/post.js +++ b/board/static/board/post.js @@ -73,10 +73,11 @@ function openReplyWindow(replyUrl) { return getReplyWindow(); } + let width = Math.min(window.top.innerWidth - 20, 500); let replyWindow = window.top.jsFrame.create({ title: "New Reply", name: replyWindowName, - width: 500, + width: width, url: replyUrl }); $(replyWindow.iframe, "iframe").on("load", () => { @@ -123,10 +124,11 @@ function openPostWindow(postUrl) { if (window.top.jsFrame.containsWindowName(postWindowName)) { return; } + let width = Math.min(window.top.innerWidth - 20, 500); let postWindow = window.top.jsFrame.create({ title: "New Thread", name: postWindowName, - width: 500, + width: width, url: postUrl, }); $(postWindow.iframe, "iframe").on("load", () => { @@ -153,10 +155,11 @@ function openReportWindow(reportUrl) { if (window.top.jsFrame.containsWindowName(reportWindowName)) { getReportWindow().closeFrame(); } + let width = Math.min(window.top.innerWidth - 20, 360); let reportWindow = window.top.jsFrame.create({ url: reportUrl, name: reportWindowName, - width: 360, + width: width, }); $(reportWindow.iframe, "iframe").on("load", () => { fitWindowToContent(reportWindow);