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

10 lines
341 B
JavaScript

import { $ } from '../utils/dom';
function showOwnedPosts() {
const editablePost = $('.js-editable-posts');
const editablePostIds = editablePost && JSON.parse(editablePost.dataset.editable);
if (editablePostIds) editablePostIds.forEach(id => $(`#post_${id} .owner-options`).classList.remove('hidden'));
}
export { showOwnedPosts };