WaniKani Forums: Like Counter
Okay so I teased this like a week back when I had just gotten the skeleton working.
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.
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
true at the start of the code.
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.
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
Please report any bugs you might find.