JS enhancements to encourage bottom-posting
This commit is contained in:
parent
a1e8bcc561
commit
51498a2dc3
|
@ -26,6 +26,7 @@ func quote(r io.Reader) (string, error) {
|
|||
if err := scanner.Err(); err != nil {
|
||||
return "", fmt.Errorf("quote: failed to read original message: %s", err)
|
||||
}
|
||||
builder.WriteString("\n")
|
||||
return builder.String(), nil
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
const textarea = document.querySelector("textarea.body");
|
||||
if (window.location.pathname.endsWith("/reply")) {
|
||||
// Auto-focus body and scroll to bottom
|
||||
textarea.focus();
|
||||
textarea.setSelectionRange(textarea.value.length, textarea.value.length);
|
||||
textarea.scrollTop = textarea.scrollHeight;
|
||||
}
|
||||
|
||||
const sendButton = document.getElementById("send-button"),
|
||||
saveButton = document.getElementById("save-button");
|
||||
|
||||
|
|
Loading…
Reference in New Issue