[qcomment] Restore feature

- Move settings HTML to template
- Move Javascript to addon file
- Remove obsolete custom CSS
This commit is contained in:
Hypolite Petovan 2020-09-09 16:52:43 -04:00
parent ec22a12365
commit d497379988
4 changed files with 57 additions and 39 deletions

18
qcomment/qcomment.js Normal file
View file

@ -0,0 +1,18 @@
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('');
}