From 98f036ae01fe90ad9d5853918602b705fdd41f02 Mon Sep 17 00:00:00 2001 From: Ugnich Anton Date: Sun, 14 Oct 2012 11:32:58 +0700 Subject: A lot of changes. --- web/post3.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'web/post3.js') 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; } -- cgit v1.2.3