Browse Source

JS enhancements to encourage bottom-posting

master
Drew DeVault 3 years ago
parent
commit
51498a2dc3
2 changed files with 9 additions and 0 deletions
  1. +1
    -0
      plugins/base/smtp.go
  2. +8
    -0
      themes/alps/assets/compose.js

+ 1
- 0
plugins/base/smtp.go View File

@@ -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
}



+ 8
- 0
themes/alps/assets/compose.js View File

@@ -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…
Cancel
Save