[Userscript] Like Counter

WaniKani Forums: Like Counter

Background

Okay so I teased this like a week back when I had just gotten the skeleton working.

pyeesiA

Since then I’ve tied to iron out the kinks and get it to be accurate. The reason it took a week is primarily because if something was wrong with the script it took a full 24 hours for the incorrect data to expire, as such testing was a drawn out process.


This is a script which keeps tracks of how many likes you have left and, for those who run out a lot, when you will get some more likes. It’s pretty simple.

It is dependent on @rfindley’s script [Userscript] Lesson/Review Count in Forums as it is in that script’s header bar that I am adding the like info. However you do not need to install rfindleys script since the Like Counter script does this automatically if needed.

What the script does is add these two items to the rightmost in rfindley’s bar. The number of currently available likes and the time until you will get more likes.

image

There is also an optional tracker for the number of received likes in the last 24 hours. This option is off by default, since that’s not the main purpose of the script, but it can be turned on by simply setting the variable showLikesReceivedCounter to true at the start of the code.

chrome_2018-02-28_06-46-49

Furthermore there is also an option for whether you want relative times in tooltips to be shown in the 12-hour or 24-hour format. I assume mostly Americans will use this so the default is 12-hour. This can also be easily changed at the top of the code.

image


I’m not sure it’s 100% accurate, but it should at the very least be quite close. Something which may mess a bit with the script is if you like posts on other devices. Now, the script will still keep track of these likes having been used, however the time the like returns may be off by minutes (if you have the forums open) or hours (if you like something on another device and hours later get to the device with the script). Despite this it will at least never show a number higher than the number of likes you do actually have.

NOTE: THE SCRIPT WILL TAKE 24 HOURS TO CATCH UP WITH YOUR LIKES AFTER INSTALLING

24 hours after installing the script all likes you had used before installing will have expired and be usable again, this is why it takes 24 hour to catch up. During this period it is perfectly fine to keep liking things as usual, but the number of likes left will be incorrect. I recommend liking something right after you instal it so that the Next Like figure will count down the 24 hours.


Where to get

https://greasyfork.org/en/scripts/37994-wanikani-forums-like-counter

Please report any bugs you might find.


Thanks @Borx and @abertssquirrel for being bettas.
image

36 Likes

Hey you actually made it. Nice!

3 Likes

295787090669469698

4 Likes

7 Likes

I can’t tell if that’s a man or a woman…

4 Likes

Well, this is a gamechanger.

It’s obviously Dumbledore

2 Likes

5 Likes

can’t you tell by his pretty beard?

4 Likes

Oh, and if you like something right after installing then the “next like” indicator will serve as a countdown towards when the script will be on track!

2 Likes

This better not awaken anything in me…

6 Likes

It’s not gay unless… you’re gay.

5 Likes

I’m super confused as well :flushed:

2 Likes

Yes! Finally I can see how many likes I have left until I should avoid every thread! wait, maybe this isn’t a good thing after all…

9 Likes

just go with it

1 Like

You’re the best! Yayyyyyy! :sparkling_heart:

1 Like

I guess I’d best get this now! Gotta be careful with my likes these days, it seems…

1 Like

I’ve been close to running out all day :eyes:
image

What I could do with 14 likes right now…

3 Likes

@Kumirei, thank you so much for the like counter! It is just what I always wanted!
Somehow, I missed out lesson/review toolbar as well!
I really need to learn JS so I can write some fun/demented stuff of my own!

1 Like