diff --git a/include/js_strings.php b/include/js_strings.php
index 56ffa9536..84c1d70fb 100644
--- a/include/js_strings.php
+++ b/include/js_strings.php
@@ -20,6 +20,7 @@ function js_strings() {
'$rating_val' => t('Rating'),
'$rating_text' => t('Describe (optional)'),
'$submit' => t('Submit'),
+ '$linkurl' => t('Please enter a link URL'),
'$t01' => ((t('timeago.prefixAgo') != 'timeago.prefixAgo') ? t('timeago.prefixAgo') : ''),
'$t02' => ((t('timeago.prefixFromNow') != 'timeago.prefixFromNow') ? t('timeago.prefixFromNow') : ''),
diff --git a/view/js/main.js b/view/js/main.js
index 8ee676f0d..c659d25cf 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -118,6 +118,34 @@
return true;
}
+ function insertCommentURL(comment,id) {
+
+ reply = prompt(aStr['linkurl']);
+ if(reply && reply.length) {
+ reply = bin2hex(reply);
+ $('body').css('cursor', 'wait');
+ $.get('parse_url?binurl=' + reply, function(data) {
+ var tmpStr = $("#comment-edit-text-" + id).val();
+ if(tmpStr == comment) {
+ tmpStr = "";
+ $("#comment-edit-text-" + id).addClass("comment-edit-text-full");
+ $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
+ openMenu("comment-tools-" + id);
+ $("#comment-edit-text-" + id).val(tmpStr);
+ }
+
+ textarea = document.getElementById("comment-edit-text-" +id);
+ textarea.value = textarea.value + data;
+ $('body').css('cursor', 'auto');
+
+ });
+ }
+ return true;
+ }
+
+
+
+
function viewsrc(id) {
$.colorbox({href: 'viewsrc/' + id, maxWidth: '80%', maxHeight: '80%' });
}
@@ -1230,6 +1258,13 @@ function chanviewFull() {
addeditortext(data);
}
+
+ function loadText(textRegion,data) {
+ var currentText = $(textRegion).val();
+ $(textRegion).val(currentText + data);
+ }
+
+
function addeditortext(data) {
if(plaintext == 'none') {
var currentText = $("#profile-jot-text").val();
diff --git a/view/tpl/comment_item.tpl b/view/tpl/comment_item.tpl
index cdcf35131..c9a3c451c 100755
--- a/view/tpl/comment_item.tpl
+++ b/view/tpl/comment_item.tpl
@@ -43,7 +43,7 @@
-