CSS to hide unseen per TL aka. group

Perhaps I should describe first what I’m trying to do.

Higher TLs on my forum like to use unseen. So I added it to top menu. But TL0/1 doesn’t need it because for them latest and/or categories shows exactly same. For them unseen is just noise.

TL1-users may/could need it, but they stay at TL1 because they aren’t active enough. And again: because they aren’t active latest offers same result.

So I decided hide unseen from anyone enyone under TL2.

As a PhD of copy&paste I know I can limit and change layout and visible parts per group. But I can’t find suitable resource because I’m lacking needed search terms.

So… can someone show me right direction?

In the perfect world we would have a component to adjust top menu per groups. Or we could even setup defaults and let an user decide what they want see or not. But we aren’t living in perfect world, are we? Well, in same dream world I would know CSS too :joy:

There is a risk I’m seeing this as a bigger issue than it is. In my world around 95 % of users are using mobiles and they don’t use dropdown menu at all — so, they never see unseen in the first place.

Well, I have previously developed a theme component that can insert css for groups, TLs or users.

I’m not sure if someone on meta has developed a similar component before… but if not, I’ll post it

Upd: The general principle is like this, considering my implementation is very strange… I won’t post it

<script type="text/discourse-plugin" version="0.8">
try {
    let your_tl = -1; // -1 means anon
    if (api.getCurrentUser()?.trust_level) {
        your_tl = api.getCurrentUser().trust_level;
    if (your_tl < 1) {
        var style = document.createElement('style');
        style.innerHTML = '#tl1-only{display:none;}'; //Or some else
} catch(err) {
    // ...
1 Like