philomena/assets/js/communications/comment.js
2019-10-04 20:09:52 -04:00

10 lines
374 B
JavaScript

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 };