diff options
author | sageman_ <sageman@anomine.net> | 2021-07-03 16:48:50 +0200 |
---|---|---|
committer | sageman_ <sageman@anomine.net> | 2021-07-03 16:48:50 +0200 |
commit | 8e3e745c2a8e9f1db6d15a67829b2aa320731c3f (patch) | |
tree | 23c320081c7a5b8230ac109ca37e7dd5fee494a5 /static/bottom.html | |
parent | dd6189378cbc4c8ad22b95951b103880dd39060d (diff) |
Preserve reply and report window states
Especially important since auto-reload gets rid of what you wrote without this patch except for those who use the classic reply form. However, this introduces a lot of bloat to the code and a lot of data kept on the client-side. Perhaps we could implement a no JavaScript version?
Also semicolons because apparently JavaScript is *this* forgiving.
Diffstat (limited to 'static/bottom.html')
-rw-r--r-- | static/bottom.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/static/bottom.html b/static/bottom.html index db9606d..994ad89 100644 --- a/static/bottom.html +++ b/static/bottom.html @@ -4,7 +4,7 @@ <form id="reply-post" action="/post" method="post" enctype="multipart/form-data"> <input id="reply-name" name="name" size="43" type="text" placeholder="Name" maxlength="100"> <input id="reply-options" name="options" size="43" type="text" placeholder="Options" maxlength="100"> - <textarea id="reply-comment" name="comment" rows="12" cols="54" style="width: 396px;" maxlength="2000"></textarea> + <textarea id="reply-comment" name="comment" rows="12" cols="54" style="width: 396px;" maxlength="2000" oninput="sessionStorage.setItem('element-reply-comment', document.getElementById('reply-comment').value)"></textarea> <input id="reply-file" name="file" type="file"> <input id="reply-submit" type="submit" value="Reply" style="float: right;"><br><br> <input type="hidden" id="inReplyTo-box" name="inReplyTo" value="{{ .Board.InReplyTo }}"> @@ -27,7 +27,7 @@ <div id="report-header" style="text-align: center; display: inline-block; width: 370px; z-index: 0; cursor: move;"></div><div id="report-close" style="display: inline-block; float: right;"><a href="javascript:closeReport()">[X]</a></div> <form id="report-post" action="/report" method="post"> <label for="comment">Reason:</label> - <textarea id="report-comment" name="comment" rows="12" cols="54" style="width: 396px;" maxlength="100"></textarea> + <textarea id="report-comment" name="comment" rows="12" cols="54" style="width: 396px;" maxlength="100" oninput="sessionStorage.setItem('element-report-comment', document.getElementById('report-comment').value)"></textarea> <input id="report-submit" type="submit" value="Report" style="float: right;"> <input type="hidden" id="report-inReplyTo-box" name="id" value="{{ .Board.InReplyTo }}"> <input type="hidden" id="sendTo" name="sendTo" value="{{ .Board.To }}"> |