# CSS selector to separate posts by current user

**URL:** <https://meta.discourse.org/t/css-selector-to-separate-posts-by-current-user/146267>\
**Category:** Development\
**Created:** [March 31, 2020, 12:54pm UTC](https://meta.discourse.org/t/css-selector-to-separate-posts-by-current-user/146267 "2020-03-31T12:54:34Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![smrtey](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@smrtey](https://meta.discourse.org/u/smrtey)\
**Post date:** [March 31, 2020, 6:17pm UTC](https://meta.discourse.org/t/css-selector-to-separate-posts-by-current-user/146267/6 "2020-03-31T18:17:08Z")

</div>

> [@meriksson](#):
>
> I am well aware that I can do this with Javascript.

Oh, just came here to post the js solution. I made a group called hidelikes and this js hides the who-liked for all group members for their own posts.

```plaintext
<script type="text/discourse-plugin" version="0.8">
    $( document ).ready(function() {
        let currentUser = api.getCurrentUser();
        var groups = currentUser.groups;
        var userID = currentUser.id;
        const hidelikes = groups.some(g => g.name === 'hidelikes');
        if (hidelikes) { 
               $('<style>').text('.boxed.onscreen-post[data-user-id="' + userID + '"] .who-liked{display: none;}').appendTo(document.head)
         }
    });
</script>

```

Obviously if you want to do it for all users just scrap the groups part

---

_[View the full topic](https://meta.discourse.org/t/css-selector-to-separate-posts-by-current-user/146267)._
