[Userscript] Like Counter

Wait, what, one got a limit on likes?
Like, like only every 24 hours for like 42 likes, something like that?

Thank you!

The hardest part is starting! I learned all the JS I know from just trying to make stuff for the forums. If you ever feel like making something just jump straight in!


@Chiv Yes, as a member you get 75 likes a day. Each like you use has a 24 hour timer on it before you can use it again, so they come back rather sporadically (as you used the the day before).

5 Likes

I have learned much of what I know by hacking other peoples code, and there is plenty of code here to hack and learn.

1 Like

It’s been over 24 hours since you updated it, so I’m reporting back to say… it’s gone mad?!

Not sure whether it’s just having a funny 5 minutes as it gets going, but I started off with -11, then when I liked something it decided I have 0, then it suddenly switched to -21, and now it’s back to 0.

2 Likes

Hahahahahaha (ノꐦ ⊙曲ఠ)ノ彡┻━┻

5 Likes

I’m sorry please don’t shoot the messenger!

dives under table
realises this is a bad idea
flees for the door

It seems mostly to be stuck on zero now, even though I’m able to like things

2 Likes

Holy crap, you actually flipped the table o.o

1 Like

Okay I have no idea why it would ever show negative numbers. I check for that: IF <0 THEN 0… WHY?!

Ugh. Have you by any chance not refreshed a tab since updating? Did you maybe lose regular status?

Would you mind opening up the console (CTRL+SHIFT+J), enter these lines one by one, and post the results for me?

localStorage.getItem('WKFlikeCounter');
localStorage.getItem('WKFlikeCounterTrustLevel');
localStorage.getItem('WKFlikeCounterTotalLikes');

Don’t give me a heart attack!

Nope, all tabs definitely refreshed. I shut the computer down, went to sleep, booted up from scratch. The 24-hour interval was yesterday evening (for me), I believe.

Just doing the console shenanigans now…

1 Like

Um, is the first one supposed to return the longest list of numbers ever seen?

“[1518602116807,1518602116807,1518602116807,1518603618292,1518604224303,1518604847891,1518607510504,1518607544386,1518622553761,1518622568175,1518622654342,1518625378461,1518629051609,1518629078048,1518629540236,1518629540236,1518630504345,1518630521640,1518630719192,1518630865397,1518630879740,1518630890092,1518631360652,1518631360652,1518631360652,1518632200897,1518636597580,1518645662606,1518647984986,1518648027764,1518648050900,1518648093630,1518648264595,1518648277168,1518648282982,1518648346897,1518648381731,1518648392026,1518648392026,1518648392026,1518648392026,1518648392026,1518648724693,1518648741033,1518648892313,1518648898270,1518648902596,1518648937724,1518648961380,1518648977282,1518648992002,1518649001068,1518649001700,1518649001700,1518649001700,1518649001700,1518649001700,1518649001700,1518649001700,1518649001700,1518649048608,1518649118278,1518649140181,1518649259435,1518649292206,1518649294926,1518649353572,1518649362586,1518649368625,1518649390147,1518649433336,1518649461239,1518649488713,1518649601808,1518649601808,1518649601808,1518649601808,1518649601808,1518649601808,1518649601808,1518649601808,1518649601808,1518649601808,1518649601808,1518649601808,1518649601808,1518649601808,1518649601808,1518649601808,1518649601808,1518649601808,1518649601808,1518649601808,1518649601808,1518649601808,1518649623671,1518649644905,1518649661190,1518649666095,1518649671334,1518649715069,1518649721622,1518649727662,1518684565478,1518684565478,1518684565478,1518684565478,1518684565478,1518684565478,1518684565478,1518684565478,1518684604440,1518684618865,1518684653311,1518685006605,1518685165707,1518685165707,1518685165707,1518685165707,1518685165707,1518685172578,1518685640415,1518685772195,1518685772195,1518685772195,1518685772195,1518685774154,1518685792912,1518686067158,1518686124788]”

For TrustLevel I got:

“[“regular”’,100,1518685772197]”

For TotalLikes I got:

“[1532,1518685771870]”

Can also send a screenshot if you want.

2 Likes

By this I mean did you lose it for like a moment only, that would explain how you suddenly had more registered likes than your max. I assume you don’t have it set to clean your cache upon closing the window? no… that can’t be it.


Haha yes, that’s it! The first one contains the timestamps for all the likes you’ve used. Thanks! I’ll have a look at these numbers… This is enough, by the way, no need for a screenshot

edit: okay, first thing I notice is that you somehow have 130 registered likes in the past 24 hours… how did this happen?

1 Like

Oh… I mean, I suppose. Would I get a notification if I regained it though? Because I haven’t been notified. I went on holiday a couple of weeks ago so wasn’t active on the forums for a week, which I guess could have affected my status a week or so down the line.

Hmm - how does the script cope if you try to use a like but don’t have any left? Cos I know Discourse does the buggy thing where the heart appears until you refresh the page anyway.

1 Like

No idea, I haven’t lost mine since I gained it, but I assume so.

The way I’m doing it right now is to check whether you get the popup since it needs to be able to register likes if it goes through even when it thinks you’re at 0.


I’m seeing that you have several occasions where multiple likes were added at the exact same time. They would account for 46 likes too many registered if they’re incorrect. The most recent one was 19 minutes ago… I’ll have look at your like history

The plot thickens! Let me know if I can do anything else to help. I’ve been on a Manga Thread Like rampage.

1 Like

Did you have the script long before this? Is it reasonable to narrow it down to the recent update?

You mean the recent madness? I only got the script a few… days ago, I think? (I can check this if you want, because I posted about it on some thread or other). So it’s possible it’s not the fault of the update, though this is the first time I’ve ever seen it go below zero, and I’ve never seen it jump around like that.

1 Like

Okay, could you refresh a tab then do this one again? Hopefully I have this figured out

localStorage.getItem('WKFlikeCounter');

[1518602116807,1518602116807,1518602116807,1518603618292,1518604224303,1518604847891,1518607510504,1518607544386,1518622553761,1518622568175,1518622654342,1518625378461,1518629051609,1518629078048,1518629540236,1518629540236,1518630504345,1518630521640,1518630719192,1518630865397,1518630879740,1518630890092,1518631360652,1518631360652,1518631360652,1518632200897,1518636597580,1518645662606,1518647984986,1518648027764,1518648050900,1518648093630,1518648264595,1518648277168,1518648282982,1518648346897,1518648381731,1518648392026,1518648392026,1518648392026,1518648392026,1518648392026,1518648724693,1518648741033,1518648892313,1518648898270,1518648902596,1518648937724,1518648961380,1518648977282,1518648992002,1518649001068,1518649001700,1518649001700,1518649001700,1518649001700,1518649001700,1518649001700,1518649001700,1518649001700,1518649048608,1518649118278,1518649140181,1518649259435,1518649292206,1518649294926,1518649353572,1518649362586,1518649368625,1518649390147,1518649433336,1518649461239,1518649488713,1518649601808,1518649601808,1518649601808,1518649601808,1518649601808,1518649601808,1518649601808,1518649601808,1518649601808,1518649601808,1518649601808,1518649601808,1518649601808,1518649601808,1518649601808,1518649601808,1518649601808,1518649601808,1518649601808,1518649601808,1518649601808,1518649601808,1518649623671,1518649644905,1518649661190,1518649666095,1518649671334,1518649715069,1518649721622,1518649727662,1518684565478,1518684565478,1518684565478,1518684565478,1518684565478,1518684565478,1518684565478,1518684565478,1518684604440,1518684618865,1518684653311,1518685006605,1518685165707,1518685165707,1518685165707,1518685165707,1518685165707,1518685172578,1518685640415,1518685772195,1518685772195,1518685772195,1518685772195,1518685774154,1518685792912,1518686067158,1518686124788,1518686372683,1518686390711,1518686541639,1518686560269,1518686563032,1518686573670,1518686578571,1518686588333,1518686599161,1518686613599,1518686615848,1518686624622,1518686636135,1518686641007,1518686891744,1518686897131,1518686899887,1518686907967,1518686917506,1518686952573,1518686973352,1518686991587,1518687185617,1518687193874,1518687296259,1518687620688,1518687756654]"

1 Like

Okay, I have an update out. Hopefully this fixes it, though I am not sure it will.

To make it a bit more accurate you can put this in the console. It will still take 24 hours until it’s “accurate” again, but this will get it closer since I removed the duplicates. Oh, and do this after updating. And refresh all tabs after updating too

localStorage.setItem('WKFlikeCounter', "[1518602116807,1518603618292,1518604224303,1518604847891,1518607510504,1518607544386,1518622553761,1518622568175,1518622654342,1518625378461,1518629051609,1518629078048,1518629540236,1518630504345,1518630521640,1518630719192,1518630865397,1518630879740,1518630890092,1518631360652,1518632200897,1518636597580,1518645662606,1518647984986,1518648027764,1518648050900,1518648093630,1518648264595,1518648277168,1518648282982,1518648346897,1518648381731,1518648392026,1518648724693,1518648741033,1518648892313,1518648898270,1518648902596,1518648937724,1518648961380,1518648977282,1518648992002,1518649001068,1518649001700,1518649048608,1518649118278,1518649140181,1518649259435,1518649292206,1518649294926,1518649353572,1518649362586,1518649368625,1518649390147,1518649433336,1518649461239,1518649488713,1518649601808,1518649623671,1518649644905,1518649661190,1518649666095,1518649671334,1518649715069,1518649721622,1518649727662,1518684565478,1518684604440,1518684618865,1518684653311,1518685006605,1518685165707,1518685172578,1518685640415,1518685772195,1518685774154,1518685792912,1518686067158,1518686124788,1518686372683,1518686390711,1518686541639,1518686560269,1518686563032,1518686573670,1518686578571,1518686588333,1518686599161,1518686613599,1518686615848,1518686624622,1518686636135,1518686641007,1518686891744,1518686897131,1518686899887,1518686907967,1518686917506,1518686952573,1518686973352,1518686991587,1518687185617,1518687193874,1518687296259,1518687620688,1518687756654]")
1 Like

Thank you!!! :heart::heart::heart::heart::heart: I’m out of likes, heh

I’ll let you know how it’s looking tomorrow, but I’m moving all the tables out of the room first.

1 Like