Heliosurge
(Dan DeMontmorency)
Julho 6, 2025, 7:14am
8
Este Theme component pode provavelmente ser usado como referência para construir um componente personalizado para ocultar opções de silenciamento. Como ele oculta curtidas para novos usuários
This is a very simple theme component that gives you the ability to hide the “like” functionality from new (TL0) users. While not 100% foolproof against an extremely determined troll, it will prevent the “like” elements from ever loading into the DOM while active. The hope is that it can act as an additional obstacle to trolls attempting to abuse likes. I also included the option to hide likes from anons in case that’s helpful for any community.
Before:
[before]
After:
[after]
Installatio…
Este usa JS, mas tenho certeza de que deve ser possível usar uma solução puramente CSS.
Aqui está um botão para ocultar curtidas com CSS
You can hide the like button with CSS, but that won’t prevent users from liking posts (a plugin would be required to ensure that), if they figure out how to un-hide the button for example.
I suppose the easiest way would be using CSS Classes for Current User's Groups which adds the current user groups to the body classes, then use CSS such as:
body.category-your-category-slug:not(.group-group_name) {
button.like {
display: none;
}
}
Let me know if you have trouble understandi…
1 curtida