[Userscript] Level Duration 2.0

Thanks! I don’t really know JS I just know what I have to; so this whole thing with promises and async in general makes things confusing for me.

I’ve updated the scripts and it seems to work just fine!

1 Like

It took me a surprisingly long time to really learn proper use of promises. There are so many wrong ways to use them! (Some of which I like better than the ‘correct’ way).

2 Likes

I have updated the script and it work seamlessly. Thank you very much.

1 Like

This is the thread for the level duration script, the one which adds the info under your level circle. That’s the LevelUP Celebrator

whoops :slight_smile: didn’t mean to do that … Moving the posts the right place and deleting

It’s cool, I don’t mind

Hmm, looks like that I’ve been stuck in this level for a quite a long time.
image

(Been 900 days since I last served Crabigator)

But now I’m back with determination to hit that sweet level 60!

5 Likes

Any way one could still get the old Level Duration script? (pre UI rework)
It was still working fine with [UserScript] WaniKani Old Header :see_no_evil:

P.S: Change can go die D:

Haha, sorry for updating the script
I was planning on updating to support the Old Header script anyway, I’ll ping you when I do.

1 Like

@GrumpyPanda @anon95214108

Updated. Should work now? If it doesn’t, uh, yeah, post here

1 Like

It does. Thank you. Just an observation, maybe you can make the space in between smaller.

1 Like

OH! Sorry, it’s not supposed to take up any extra space at all. I just missed changing a class name. Try now

Perfect. Thanks.

v.2.6.0 now updates automatically every 15 minutes

Love the script!

A couple of observations:

  1. you forgot to do the “day/days” thing when displaying the hours, like so:
level_text = (days_passed == 1 ? " day " : " days ") + hours + (hours == 1 ? " hour" : " hours");
  1. Just my opinion, but I think it looks better 3 or 4 pixels lower… margin-top -3 or maybe -4 instead of -7… especially when Dashboard Level is also running.

Anyway, thanks for the scripts!

1 Like

Thank you! I don’t know how I missed that

Definitely agree with this, it’s been bothering me as well. I think I’ll add a CSS rule in the Dashboard Level script to make it look better. I don’t think I will change it in the regular case, though, as the idea was that it should occupy whatever space is already there without making the header any bigger, and I chose -7px based on that.

1 Like

Hello,
am I the only user experiencing this ? It happens when I stay on the dashboard page for more than 1 update period (15 min?) :

1 Like

Fixed! Thanks for reporting!

2 Likes

Is there any way to manually set level duration as with the previous script? Thanks.

No. The last one had that feature because it didn’t know exactly when you leveled up, but I use the API to figure this out, so it is exact. Why would you need to change it?