[Userscript] Like Counter

Would it be bad design to just make the heart disappear? :thinking: Same as on your own posts when using transparency userstyle.

1 Like

Woah, I completely forgot that I did that! I thought it was native! Well, not that strange since Discourse changed it and I kept the original

1 Like

I did try this, but I am worried that the count will be off and you actually do have likes to be used sweat_smile

4 Likes

What if there are some likes left but the scripts thinks there are none? An indicator is better because it leaves open the possibility to click the heart anyway.

Edit: leeboed by Kumirei. I should read previous posts more attentively.

2 Likes

If you reallyyyyyy want to like a post but “don’t have” any likes left, you can just click the L key on your keyboard, right? (joke answer, hehe) I don’t think it’d be a problem for mobile users though, since I guess most doesn’t use userscripts on their phones :thinking:

But yeah, sounds like it could be problematic

3 Likes

Maybe you could just add a diagonal strikethrough?

image

CSS
button.toggle-like.like::after {
	content: "";
	width: 1.35em;
	height: 0.1em;
	position: absolute;
	display: block;
	background-color: var(--primary-low-mid-or-secondary-high);
	transform: translate(-0.1em, -0.66em) rotate(-35deg);
}

button.toggle-like.like {
	cursor: not-allowed;
}
2 Likes

Oh, I tried that, but yours looks much better than what I tried. Might be a good option

1 Like