philomena/assets/js/communications/comment.js

11 lines
374 B
JavaScript
Raw Normal View History

2019-10-05 02:09:52 +02:00
import { $ } from '../utils/dom';
function showOwnedComments() {
const editableComments = $('.js-editable-comments');
const editableCommentIds = editableComments && JSON.parse(editableComments.dataset.editable);
if (editableCommentIds) editableCommentIds.forEach(id => $(`#comment_${id} .owner-options`).classList.remove('hidden'));
}
export { showOwnedComments };