philomena/assets/js/communications/post.js

11 lines
341 B
JavaScript
Raw Normal View History

2019-10-05 02:09:52 +02:00
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 };