[Userscript] Wanikani Heatmap

The position setting enters in conflict with other scripts.

If you have Leaderboard installed and you set the position to Below panels then Heatmap attaches itself to Leaderboard above the panels.

Also I am implementing a position setting in Item Inspector. I have the same issue with Leaderboard as the Heatmap.

There is a conflict between Item Inspector and Heatmap. If I set Item Inspector to Below panels or to Bottom and Heatmap is set to bottom, then Heatmap crashes.

Console output when Item Inspector is set to Bottom.


Console output when Item Inspector is set to Below panels.


My positioning code. I couldn’t get yours to work in Item Inspector so I had to adapt.

            if (quiz.settings.position === undefined) {quiz.settings.position = 2};
            let position = [".progress-and-forecast", '.progress-and-forecast', '.srs-progress',  '.span12 .row', '.span12 .row:last-child',][quiz.settings.position];
            if (quiz.settings.position == 0){
            } else {

I will release a new version of Item Inspector soon. Then you will be able to experiment with the conflict.

Edit: Found another conflict between Leaderboard and Heatmap.

When Heatmap is set to Below panel the Heatmap css interferes with Leaderboard css. this does not happen with other Heatmap locations. The css interference affects users whose levels is in Pleasant. Other users are unaffected.

Correct css.


Interfered css (user blacked out)


Edit2: I have done more testing.

I can no longer reproduce the conflict when Heatmap is below panels and Item Inspector is at Bottom. I don’t know what is changed. Edit again: if I disable Remove Useless Panel this conflict happens again.

Also when both Heatmap and Item Inspector are Below panels the css conflict between Heatmap and Leaderboard disappears.

Edit3: Found another conflict.

When I edit the settings of either Heatmap or Item Inspector the script exchange positions in the dashboard. This is disconcerting. People expect to have the scripts in a certain order and it changes all the time. I think this is a problem with the automatic refresh of the layout. We should not refresh when the position setting has not been modified.

Edit4: Stopped refreshing Item Inspector when the position setting not modified. Item Inspector is no longer exchanging place with Heatmap when I save settings.

Edit5: I have published a version of Item Inspector with the positioning code. If you want to test the conflict it is here.