diff options
Diffstat (limited to 'bin/mail/comment.sh')
-rwxr-xr-x | bin/mail/comment.sh | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/bin/mail/comment.sh b/bin/mail/comment.sh index f13b03d..6c95dc3 100755 --- a/bin/mail/comment.sh +++ b/bin/mail/comment.sh | |||
@@ -2,7 +2,22 @@ | |||
2 | 2 | ||
3 | # Save incoming mail as comment | 3 | # Save incoming mail as comment |
4 | # Usage: | 4 | # Usage: |
5 | # echo '|<PATH_TO_THIS_SCRIPT> --output_dir=<PATH_OF_HTML_FILES>' >>~/.forward | 5 | # Step1. Add script into forward(5) for MDA |
6 | # echo '|<PATH_TO_THIS_SCRIPT> --output_dir=<PATH_OF_HTML_FILES>' >>~/.forward | ||
7 | # | ||
8 | # Step2. Insert related html file into target page, the following example use <object> element | ||
9 | # Please replace <PATH> for your target page: | ||
10 | # <div style="border-radius: 6px; background: lightyellow"> | ||
11 | # <a style="display: inline-block; margin: 0.5em 0.5em 0 0; float: right" href="mailto:comment@topo.tw?subject=Comment on page: ${path}">[Comment on this page]</a> | ||
12 | # <object type="text/html" data="/<PATH>.comment.html" onload="observeResize(this)" style="width: 100%;"></object> | ||
13 | # <script> | ||
14 | # function observeResize(commentBlock) { | ||
15 | # new ResizeObserver((entries) => { | ||
16 | # commentBlock.style.height = entries[-1].clientHeight + 'px'; | ||
17 | # }).observe(commentBlock.contentDocument.documentElement); | ||
18 | # } | ||
19 | # </script> | ||
20 | # </div> | ||
6 | 21 | ||
7 | # 1. Check mail is for comment {{{ | 22 | # 1. Check mail is for comment {{{ |
8 | 23 | ||