diff options
Diffstat (limited to 'web/post3.js')
-rw-r--r-- | web/post3.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/web/post3.js b/web/post3.js index 31b3f8f2..3267f9c0 100644 --- a/web/post3.js +++ b/web/post3.js @@ -25,7 +25,12 @@ function addLocation() { } function addTag(tag) { - document.forms["postmsg"].body.value='*'+tag+' '+document.forms["postmsg"].body.value; + var s = document.forms["postmsg"].body.value; + if (s.indexOf ('#') == 0) { + document.forms["postmsg"].body.value = s + ' *' + tag; + } else { + document.forms["postmsg"].body.value = '*' + tag + ' ' + s; + } return false; } |