[Userscript] WK Extra study mover

Unfortunately, I made the mistake of assuming the script was working last night and discovered that it conflicts with Dashboard Cockpit now! Is there any way your script can resolve the conflict with its “Display Extra Study” setting?

Is the conflict that it’s taking the dropdown and putting it onto the dashboard?

1 Like

@UInt2048 v0.3.2 and 0.3.3 is out, it fixes some small issues, like the fact, that the color of the small rectangle in the dropdown didn’t match the dropdown color and the fact that I left in the user menu button on accident.

Also solved the dashboard cockpit issue if it was the one above.

Currently it’s a hack, the script is checking if anything is trying to move the dropdown, and promptly says no to that request. It would be great if @rwesterhof could ignore the extra study box if it has a .es-mover-header value. I added a class to the main element for every single position (full list in the script).

Also @Sinyaven the positioning of the audio checkbox isn’t perfect, when in minimal mode:
image
I’ve added the class es-mover-minimal (and similar ones for all other styles) to the main div. My recommendation is something like bottom: 0; right: 12px for it, then it looks like this:
image
But of course, whatever suits your script best should work fine, just can’t really solve this on my own easily.

3 Likes

Cockpit v0.5.6 ignores the Extra Study Panel if it has the .es-mover-header class.
I tried to add the ignore for all .es-mover classes, but unfortunately that didn’t work well. After the Extra study mover moves the panel into position, the cockpit moves the panels it was placed next to and promptly hides the div that the Extra Study Panel is now in (disappearing it entirely). So the header position is the only exception for the time being.

Logically speaking Extra study mover should execute first so the Cockpit has access to the added class, but in practice the Cockpit is so slow that it doesn’t seem to matter :laughing:

If I can also make request of my own…
Next to display style reduced and minimal, can there be an option for no-text? I locally use this

    if (settings.style === "no-text") {
        extraStudy.querySelector("p").remove();
        document.querySelector(".extra-study .info").remove();
        document.querySelector(".extra-study .info").remove();
    }

to remove the text and ? parts of the buttons, but keeping the picture

image

3 Likes

Sure, I was thinking about an option for removing the question marks either way.

3 Likes

Seems like the extra study panel is still getting moved by the extension. Some of the selectors didn’t get the “not(…)” appended to them.

1 Like

For me, it works correctly if display Extra Study is set to the default value of “Above level progress” in the cockpit.

If it’s set to none, clicking the dropdown reveals nothing.

I haven’t tested other setting values.

However, the bullet points are visually unpleasing in dark mode:

image

1 Like

This is because the move prevention is still active in that version.

I’ll do something about the bullet points.

1 Like

My if statement wasn’t properly working - it should be fixed now.
The missing not(…) selectors are buried behind an if statement and should not run at all when the panel is in the header.
I’ll try to think of a way that allows the cockpit to be hands off the panel entirely when it detects es-mover.

1 Like

@rwesterhof Added in the options to remove the image only and the questionmark, alongside a text only option. I left in the hackfix for now, drop a reply when that’s fixed.

@UInt2048 the list issue should be fixed now, check it out

I also support breezy dark now thanks to CIDWWA supporting it as well, though it’s not perfect
And finally, huge code reorder, should be much more readable and way less hacky

3 Likes

Works well now, thank you for supporting my weird use cases :stuck_out_tongue_winking_eye:

1 Like

In reduced mode there seem to be some styling bugs with the settings button, with a button outline appearing below the icon:
image
And with @Sinyaven’s audio quiz enabled the settings icon disappears completely, and there’s still that strange button outline below:
image

They’re not huge problems, but if you get a chance to have a look at some point… :smiley:

Are you on version 1.4 of Audio Quiz and version 0.4.0 of Extra Study Mover? The Audio Quiz switch does not cover the settings icon for me.


@Gorbit99 It might be nice if the Extra Study popup in the header would automatically close when clicking a different header button anywhere else.

Also fyi, if there are 0 Recent Mistakes for extra study, the <a> is instead a disabled <button>, so the line

button.querySelector("a").style.paddingRight = "12px";

in removeQuestionmarks() throws an error. Maybe you could change it to querySelector("a, button").

And the help popup does not work correctly when the extra study panel is in the header:

image

2 Likes

Ah - indeed my mistake, audio quiz wasn’t updated. However Extra Study mover having the button outline below still happens even on the latest versions @Gorbit99. Seems to be an issue with Breeze Dark. I know that’s not your script, but any chance you could see if there’s anything you can do about it at some point? :pray:

image

It’s actually my fault, when hunting another bug, I’ve accidentally modified a line of code I shouldn’t have

Updated CIDWWA for this, now they do

Course it is, I’m not perfect enough to have noticed this

Now it should

2 Likes

Added a “None” option to the position settings if you want to get rid of the ui element completely. This way the settings button gets placed into the user menu. This should be done in a way that doesn’t break any other extension trying to reach the extra study container.

Also, looking back, this option was kinda obvious.

Also, in other news, esm reached 50 downloads, which is the first time it happens with one of my scripts!

5 Likes

It’s a simple but great script, you deserve it. I’d been waiting for this since extra study came out. Thank you.

2 Likes

Glad you like it!

2 Likes

Hmm, since a day or two ago the buttons seem to have suddenly become vertically ordered instead of horizontally like before - any idea what that could be about? (In reduced mode)


I’ve tested removing all other scripts as well as Breeze Dark, still stays vertical.

Well, it seems like wk made that change on purpose, I’ll deal with it either later tonight, or over the weekend

1 Like