friendica-addons-sekb/qcomment/qcomment.js
Hypolite Petovan d497379988 [qcomment] Restore feature
- Move settings HTML to template
- Move Javascript to addon file
- Remove obsolete custom CSS
2020-09-09 16:52:43 -04:00

18 lines
486 B
JavaScript

function qCommentInsert(obj, id)
{
let $textarea = $('#comment-edit-text-' + id);
if ($textarea.val() === '') {
$textarea.addClass('comment-edit-text-full');
$textarea.removeClass('comment-edit-text-empty');
openMenu('comment-edit-submit-wrapper-' + id);
}
var ins = $(obj).val();
ins = ins.replace('&lt;', '<');
ins = ins.replace('&gt;', '>');
ins = ins.replace('&amp;', '&');
ins = ins.replace('&quot;', '"');
$textarea.val($textarea.val() + ins);
$(obj).val('');
}