# OP-Benutzernamen zu Body-CSS-Klassen hinzufügen

**URL:** <https://meta.discourse.org/t/add-op-username-into-body-css-classes/167178>\
**Category:** Product Support\
**Created:** [14. Oktober 2020 um 12:52 UTC](https://meta.discourse.org/t/add-op-username-into-body-css-classes/167178 "2020-10-14T12:52:12Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![nildarar](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nildarar/32/331927_2.png) [@nildarar](https://meta.discourse.org/u/nildarar)\
**Post date:** [18. Oktober 2020 um 12:56 UTC](https://meta.discourse.org/t/add-op-username-into-body-css-classes/167178/7 "2020-10-18T12:56:40Z")

</div>

Um mein Problem zu lösen, habe ich durch das Lesen dieser Seite folgende Lösung gefunden:

[https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/app/lib/plugin-api.js#L1138-L1140](https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/app/lib/plugin-api.js#L1138-L1140)

```
<script type="text/discourse-plugin" version="0.8">
    const specialTopicUserId = 1000;
    api.decorateTopicTitle((topicModel, node, topicTitleType) => {
        if (topicModel && topicModel.user_id === specialTopicUserId) {
            $("#topic").addClass("anon");
        }
    });
</script>

```

---

_[View the full topic](https://meta.discourse.org/t/add-op-username-into-body-css-classes/167178)._
