[Userscript] WK Dashboard Cockpit

much appreciated! That update worked!

1 Like

hello,
after brand new option Extra Study Mode added to Wanikani, will there be a chance of update for this script, so itā€™ll be possible to use Dashboard Cockpit and at the same time have extra study mode visible?

btw I really love this script, thank you so much for making it :heart:

1 Like

Your timing is impeccable. Version v0.5.4 with support for the new panel is now out. If it doesnā€™t update automatically you can force the update in Tampermonkey.

edit: new position options for the panel available under the Settings > Panels tab
cockpit_settings_3v0.5.4_70p

2 Likes

haha
thanks for the quickest update I ever seen then :joy:

works great

1 Like

I debated whether I should have published tomorrow - I might be creating unrealistic expectations like this. It took a little longer than 7 mins to code and test all the new position optionsā€¦:eyes:

5 Likes

donā€™t worry, I bet no one will expect updates that fast
also yeah, I know coding is not that easy, and it had to take more time to code whole update

2 Likes

Thank you for adding the position options! Iā€™m now using your script alongside the brand-new [Userscript] WK Extra study mover (despite the cockpit taking precedence) for its minimal size setting.

Is there any way you could add an ā€œabove SRS progress arcā€ setting to the extra study positioning?

1 Like

Added to version 0.5.5
This looks particularly good when combining with a hidden review forecastā€¦ all the buttons on the top row!

2 Likes

Once I saw all the buttons on the top row, I wondered if I could get them all in the header! Now that Extra Study Mover lets me do this (and I can set Extra Study to none in this script already), it makes the cockpit wheel seem unnecessarily large.

Would it ever be a supported configuration to remove the lessons & reviews buttons and/or shrink the SRS wheel? To avoid messing with this script directly, hereā€™s a demo script you can install that interferes with the cockpit to demonstrate:

Script Code
// ==UserScript==
// @name         Personal Styles
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       UInt2048
// @match        https://www.wanikani.com/
// @match        https://preview.wanikani.com/
// @match        https://www.wanikani.com/dashboard
// @match        https://preview.wanikani.com/dashboard
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @run-at       document-end
// @grant        none
// ==/UserScript==

(function() {
    (function waitForElm(selector) {
        return new Promise(resolve => {
            if (document.querySelector(selector)) {
                return resolve(document.querySelector(selector));
            }

            const observer = new MutationObserver(mutations => {
                if (document.querySelector(selector)) {
                    resolve(document.querySelector(selector));
                    observer.disconnect();
                }
            });

            observer.observe(document.body, {
                childList: true,
                subtree: true
            });
        });
    })('#db_cockpit_CSS').then(element => {
        $('head').append(
            `<style id="UInt2048_CSS">
                 #dbc_gas {
                     grid-column-start: 1; grid-column-end: 1; grid-row-start: 1; grid-row-end: auto; min-width:0px;
                 }
                 #dbc_currentLevel {
                     grid-column-start: 1; grid-column-end: 2; grid-row-start: 1; grid-row-end: auto;
                 }
                 #dbc_core {
                     grid-column-start: 2; grid-column-end: span 2; grid-row-start: 1; grid-row-end: auto; align: center; margin: 0 auto;
                 }
                 #dbc_bar60 {
                     grid-column-start: 1; grid-column-end: span 3; grid-row-start: 1; grid-row-end: auto;
                 }
                 #dbc_cruise {
                     grid-column-start: 4; grid-column-end: 4; grid-row-start: 1; grid-row-end: auto;
                 }
                 #dbc_forecast {
                     grid-column-start: 4; grid-column-end: 5; grid-row-start: 1; grid-row-end: auto;
                 }
             </style>`
        );
        $('#dbc_gas').detach();
        $('#dbc_cruise').detach();
        $("#speedometer").width(301).height(301);
    });
})();
Portion of screenshot with this script, etc. running

I know Iā€™ve asked a lot of you recently and Iā€™m aware that any new features requires a maintenance burden even with the code provided, so I understand if you decide not to implement this.

1 Like

shrinking the SRS wheel was on my ā€˜to do somedayā€™ list already (edit: added in v0.6) -
the cockpit shrinks the buttons because they are so large yet isnā€™t exactly modest in size either. As you saw, pretty much the entire thing is already dependent on the initial canvas size, so this should be doable.
And the complete hiding of at least the lessons button (I donā€™t have any lessons f.i. edit: added in v0.6) is something I was already thinking of as well. With scripts that place the buttons in the header, a complete hiding makes sense. (edit: added in v0.6) Iā€™ll see what I can do, but Iā€™m a little busy this week. Iā€™ll add these requests to the to do list for now, so I wonā€™t forget.

1 Like

Hello! Wanted to start off by saying thanks for making this, it adds flair as well as more detailed breakdowns of my progress.

I canā€™t help but be driven slowly mad by one small things Iā€™ve noticed recently: everyone seems to use their own distinct shade of gold for the burns. I have golden burn installed and assumed that thatā€™s what everyone would be basing their implementation off of, but the colors are all slightly but noticably different. Hereā€™s a screenshot of the hex codes side by side:

Left to right this is Golden Burnā€™s gold, Dashboard Cockpitā€™s gold part of the wheel, DCā€™s gold part of the progress bar, and Overall Progress Barsā€™s gold part of the progress bar.

Can I ask that you standardize at least the middle two since those are both part of this script? Ideally Iā€™d love if you could just use the left color since thatā€™s what Iā€™ll be asking Kumirei to change his to.

3 Likes

Interesting side note: I got the color for Golden Burn from an actual photo of a gold bar, but that doesnā€™t mean much since a huge percentage of goldā€™s color is reflected from its surroundings. Probably all of those shades are legit in the right lighting.

2 Likes

Yeah I donā€™t mean to say that one or the other is the ā€œcorrectā€ gold color. I just want consistency.

1 Like

Shockingly, Dashboard cockpit uses the exact colors from Golden Burn. I simply copied it.
The tricky part here is that both Golden Burn and the wheel part of the cockpit use a color gradient.
It runs from #faac05 to #fbc550 so when sampling, the result depends on which part of the area you sampled. The cockpitā€™s progress bar does not use a gradient, and simply uses one of the end values.
That I could probably change, so it looks more similar to the wheel. Iā€™ll put it on the list.
edit: added in v0.6

3 Likes

Here you go. :slight_smile:

2 Likes

Thank you!

2 Likes

@Beyond_Sleepy I quoted the post in this thread which created that link. Iā€™m surprised you didnā€™t notice thatā€™s how it worked before as a Regular.

1 Like

Honestly, Iā€™ve noticed it, understood it, utilized it, and I still failed to make the connection when I saw it there. A brain-fart moment:p

1 Like

Username checks out :stuck_out_tongue:

1 Like

More than you know :sweat_smile:

2 Likes