Skip to main content
Solved

Custom CSS to disable Likes from Activity Feeds

  • 10 July 2024
  • 5 replies
  • 44 views

Context / Problem:

  1. Our community is having a problem with abuse of our gamification system, specifically points earned when others like your post.
  2. It’s pretty isolated to a few individuals per month and I have ways to catch it and address it when it happens. Thus, I don’t want to let a few instances of cheating remove the value of giving/earning points for likes. 
  3. It’s clear that most are doing this by going to someone’s profile page and just liking all the posts/replies in the user activities feeds (Topics & Replies) on their friends/colleague’s profile. I’d like to remove this easy way to cheat; I believe adding friction will eliminate most of this.
Links to User Activity Feeds on User Profiles

Desired Solution: Custom CSS to disable the clicking of the Like button from these/any activity feeds, thus forcing users to click into the post to like it. 

I imagine there’s a way to just hide the like button altogether (if you know how to do that, please share...) 

But ideally I can just disable the click/capture of the Like, not hide it. The number of likes on a post is helpful context for those not cheating, showing which posts in the general activity feeds are most popular etc. 

 

5 replies

Userlevel 5
Badge +4

Desired Solution: Custom CSS to disable the clicking of the Like button from these/any activity feeds, thus forcing users to click into the post to like it. 

I imagine there’s a way to just hide the like button altogether (if you know how to do that, please share...) 

But ideally I can just disable the click/capture of the Like, not hide it. The number of likes on a post is helpful context for those not cheating, showing which posts in the general activity feeds are most popular etc. 

 

This feels like an idea… if it doesn’t already exist (and it seems like it doesn’t, since I can just go through the Gainsight ideas page and upvote ideas without clicking into them).

Being able to like (or vote) for something without actually reading it cheapens the system. There’s no good way to gauge a post’s content from just a quick subject line. We should ALL be REQUIRED to actually load into a full post to like, upvote, and/or comment.

Userlevel 2

Your post makes we want to add a new idea for introducing a rate limit for the like button. So if a user liked too many posts within a short amount of time they would get a “time-out” or temp block on their account along with a notification letting them know why it was occurring. 

Userlevel 5
Badge +4

Your post makes we want to add a new idea for introducing a rate limit for the like button. So if a user liked too many posts within a short amount of time they would get a “time-out” or temp block on their account along with a notification letting them know why it was occurring. 

 

Love this -- Discord has a similar feature that can be enabled for different roles to limit over-posting.

Userlevel 1

If you’re wanting to hide the like button on the following paths:

.../search/activity/topics
.../search/activity/reactions
.../search/activity/solved
 

Assuming the below class names are consistent across Gainsight instances, you could try…
 

body.forum--search .thread-meta-item--likes {

    display: none;

}

 

Should do what you’re asking through css. However, if the problem persists and you suspect the users are savvy with dev tools and are unhiding the like button; You could try a scripting solution to completely remove the element from the DOM when on that page:

if (window.location.pathname.startsWith('/search/activity/')) {

    const likeButtons = document.querySelectorAll('body.forum--search .thread-meta-item--likes');

    likeButtons.forEach(likeButton => likeButton.remove());

}

 

If there is an option provided through Gainsight’s admin panel to configure this, that solution would be best.

Userlevel 6
Badge +7

Thanks, everyone!

Special thanks to @jordan.appling-marx for the css starting point. That didn’t quite work for me, but got me poking around and googling options enough to where I landed on this:

#customcss #root button.thread-meta-item {
pointer-events: none;
}

That disables the ability to Like in all feeds, including the activity feed on home. But you can still like the post/reply once you click into it. (Not sure if it works for Ideas and votes; we’re not using that functionality currently, so it was outside what i tested)=

If you want to hide the like icon altogether, you can do this:

#customcss #root button.thread-meta-item {
display: none;
}

 

Note: the #customcss #root stuff is a best practice outlined here:

 

And if anyone puts this in as an idea, I’ll vote for it. But I suspect it won’t go very far given that it’s already possible to do with custom css. 

Reply