[Unsupported] Userscript: Dashboard Level Progress Detail (srs stages on progress bars)

#1

This script provides a comprehensive srs-stage overview of your vocab, radicals, and kanji… So you will always see progress on your bars after a lesson or review.

https://greasyfork.org/en/scripts/34866-wanikani-dashboard-level-progress-detail/code

It will list radicals, kanji, and vocab for the current level, as well as for the previous level if they haven’t reached 90%+ guru level.

19 Likes

The New And Improved List Of API and Third Party Apps
Progress Trickled After Subscription
WaniKani Lesson Balance script
Experimenting with motivating ways to show progress
[Unsupported] App Store script
The New And Improved List Of API and Third Party Apps
Progress Trickled After Subscription
WaniKani Lesson Balance script
[Userscript] Dashboard Level Progress Detail. update to broken script
[Userstyle] WaniKani Breeze Dark
#2

I definitely do :smiley:

Also, don’t forget your JLPT N5! :wink:

0 Likes

#3

Looks like a cool feature to me. I’m always for more information.

0 Likes

#4

Ok. The script is published (see link in OP). Let me know what you think. @jprspereira @Powerpuncher

0 Likes

#5

Greasyfork seems to be down, I’ll have to check it out when I come back from work.

0 Likes

#6

FYI It’s up now.

0 Likes

#7

I installed it but I am getting this now:

Page loading is stuck and browser tab can’t not respond to any interaction. It fixes if I disable the script.

1 Like

#8

This will be hard to diagnose. I can pull up the Chrome Performance tab but Tampermonkey uses generated names for scripts. So that’s not too useful.

I can say that there’s nothing about this script that is computationally taxing. It’s a small amount of data (6 items) that it processes it in O(n) time – i.e. linear time with the scale of the data.

Because I’m not sure how the slow-page-detection works, can you see if closing all other browser windows makes a difference?

If that doesn’t make a difference, try leaving this script on and going through the other scripts you have installed and having one of them disabled at a time (with a forced page reload after changing the enabled states of scripts).

If anyone reading this has other ideas, by all means chime in.

0 Likes

#9

looks like problem is in this block:

while(json.progresses.length > 3) {
    var progress = json.progresses[0];
    if (progress.gurued_total*100.0/progress.max >= 90) {
        json.progresses = json.progresses.slice(1);
    }
}

I printed value of this expression progress.gurued_total*100.0/progress.max >= 90
This was the result:

rogress.gurued_total*100.0/progress.max= 100
progress.gurued_total*100.0/progress.max= 96.96969696969697
progress.gurued_total*100.0/progress.max= 21.782178217821784
progress.gurued_total*100.0/progress.max= 21.782178217821784
progress.gurued_total*100.0/progress.max= 21.782178217821784
progress.gurued_total*100.0/progress.max= 21.782178217821784
...
...
...

progress.gurued_total*100.0/progress.max= 21.782178217821784

So if expression is false then length of progresses is never decreased, resulting in an infinite loop. I just added a simple else to break out of loop incase condition fails. It now works.

Just a friendly suggestion, never remove/add elements from the collection which is being use in current loop condition. Use a separate collection for storing manipulated collection items :slight_smile:

1 Like

#10

Completely not working for me in Chrome. Just crashes the page.

0 Likes

#11

Yeah, same infinite loop problem.

I think what you wanted with:

        while(json.progresses.length > 3) {
            var progress = json.progresses[0];
            if (progress.gurued_total*100.0/progress.max >= 90) {
                json.progresses = json.progresses.slice(1);
            }
        }

is instead something like…

        json.progresses = json.progresses.filter(function(progress) {
            return progress.gurued_total*100.0/progress.max < 90;
        }

If you were trying to filter out the previous level (your code does not do this but maybe that’s what you were trying to do with the if check?):

        var currentLevel = json.progresses
            .map(function (progress) { return progress.level; })
            .sort(function (a, b) { return b - a; })[0];

        json.progresses = json.progresses.filter(function(progress) {
            return progress.level === currentLevel &&
                progress.gurued_total*100.0/progress.max < 90;
        }

This is an excellent script idea, just needs some more implementation work. I’m working on some alterations myself which I would be happy to share once they’re complete. (Particularly, compatibility with
WaniKani Dashboard Progress Plus.)

2 Likes

#12

Works fine in firefox, but it doesn’t play well with the breeze dark style:

Would be nice if there were hover-over tooltips :slight_smile:

1 Like

#13

I posted an update to fix the infinite loop bug. Thanks @temporaryuser381, @musera, @smrq.

1 Like

#14

What kind of tooltips are you looking for, @Powerpuncher?

0 Likes

#15

I’ll most likely take a look at the breeze dark style issue tomorrow evening.

0 Likes

#16

Like it so far but it no longer shows the remaining level radicals and kanji. I frequently use these (along with Wanikani Dashboard Progress Plus) in order to plan out my lessons and when I’m going to level. That and the Ultimate Timeline were the most important features to me on the dashboard.

Any plans to put these back (and make it play well with Dashboard Progress Plus)? Really don’t want to have to choose one or the other.

2 Likes

#17

This is the most crucial feature. Thanks a lot for looking into it. :smiley:

1 Like

#18

I don’t have the vocabulary progression counter, is that part of your script or do I have to get that somewhere else?

Thanks for making this, it’s gonna be really useful! :slight_smile:

0 Likes

#19

Its part of the script I am getting four progress bars, three for current level items and one for previous level vocab.

But author said he is processing six items, so may be if you have any pending radical and kanji from previous level then progress bars for those items would also show up.

0 Likes

#20

I’ll probably add support for this script as I’m most likely start using it myself.

1 Like