# Popup warning for NSFW category

**URL:** <https://meta.discourse.org/t/popup-warning-for-nsfw-category/21296>\
**Category:** Feature\
**Created:** [2014 年 10 月 19 日午後 12:18 UTC](https://meta.discourse.org/t/popup-warning-for-nsfw-category/21296 "2014-10-19T12:18:48Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![lidel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lidel/32/115991_2.png) [@lidel](https://meta.discourse.org/u/lidel)\
**Post date:** [2014 年 10 月 19 日午後 5:02 UTC](https://meta.discourse.org/t/popup-warning-for-nsfw-category/21296/2 "2014-10-19T17:02:09Z")

</div>

I think you could trigger popup with custom JS snippet added in `/admin/customize/css_html`.

For example, if your category name is _nsfw_, try something along this lines (when `document` is ready):

```javascript
  if ($('#topic-title a.badge-category:contains("nsfw")').length) { 
   console.log('This post belongs to NSFW category'); 
  }

```

---

_[View the full topic](https://meta.discourse.org/t/popup-warning-for-nsfw-category/21296)._
