User custom field toggle for sidebar (SFW Mode)

Okay, now I get it. Well, you seem to be inventing the wheel of this solution I mentioned in the first post: Our solution for blurring NSFW content

It does what you talk about. Looks into the user’s field value and sets CSS class via JS. Please make sure you use the code from this message as the base one, because the one used in the first post there relies on deprecated Discourse methods.

In addition, you can look into this: CSS Classes for Current User's Groups to adjust the look & functionality of your website based on user’s groups :slight_smile:

1 Like