Topic Stopwatch

After looking into it, I’m not sure when or if the visible-to-staff-only tags will be usable with this, but being that it’s such a new feature, I’m hoping the necessary elements to pull it off might show up at some point. I haven’t given up on this yet!

It dawned on me you might be able to get somewhat of the desired result using the following CSS. The tag will still be in the DOM, but not visible on the page:

.tag-tagname {
    display: none;
}
.staff .tag-tagname {
    display: initial;
}

You would change “tagname” to whatever tag you want hidden for all non-staff users. If that CSS ends up being sufficient, I can work it into a setting. Let me know :slightly_smiling_face:
Edit: this ends up leaving a comma if there’s more than one tag. On an unmodified theme, the following additional CSS looks like it should work to adjust the commas if the hidden tag is at the end of the list of multiple tags, but I would test it to make sure there are no adverse side effects I didn’t pick up on:

.discourse-tags .discourse-tag.simple:after, 
.list-tags .discourse-tag.simple:after {
    display: none;
}
.discourse-tags .discourse-tag.simple:not(:first-child):before, 
.list-tags .discourse-tag.simple:not(:first-child):before {
    content: ", ";
    margin-left: 1px;
}
.discourse-tag.simple, 
.discourse-tag.simple:visited, 
.discourse-tag.simple:hover {
    margin-right: -4px !important;
}

In the mean time, if you’d like to update, I’ve added a theme setting to adjust the spacing between the clock and the control button. This should be helpful for those using custom fonts on their forum. If anyone finds any issues with this new addition, please, let me know.

6 Likes