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.
What the script does is add these three items to the header. The number likes received, the number of currently available likes, and the time until you will get more likes.
There is an optional tracker for the number of received likes in the last 24 hours. This option is on by default, but it can be turned off by simply setting the variable
false 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 24-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.