[UserScript] SRS Grid Details

No worries. I thought about forcing the popup to show, but didn’t want to be too intrusive. I did just quickly add in a little message to go along with the opening of the main menu though. Now its only slightly less intrusive than going right to the settings.
Also thought about automatically redirecting to settings page and auto-grabbing it, like some scripts do, but I didn’t like the idea of forcing it (don’t want people thinking I’m hijacking their info or anything)

1 Like

It doesn’t seem to be compatible with the clean dashboard script :crying_cat_face:

What browser? I’ve tried to come up with workarounds, but that clean dashboard script does one hell of a job. Hard to fight it and win.

chrome

I would love to use your script, but if it’s a pain in the ass, don’t do it for me, I’m sure your have better things to do :slight_smile:

Clean dashboard is a userstyle right? Or is there a userscript version too?
For the userstyle, you can just delete the /-- SRS PROGRESS --/ portion of it. Doing so will either break any future updating of the style, or break this script when it updates. Not sure how updating of userstyles handled edited ones.
Still, would be nice to not have to make people tweak scripts/styles on their own.

Maybe it’s a userstyle, I don’t remember, but I’m using everything through tampermonkey, styles included.

I’ll tinker around with it later, now that the forum section is no longer on the site, there’s plenty of room for something else.

Alright, if its tampermonkey that’s a userscript. I seemed to remember there being both a script and style version of clean dashboard, but its been a while. Fighting a script is even harder due to there being guarantee on the order they run, and finish, in.
Good opportunity to try your hands at editing some JQuery if you’re so inclined. :wink:

I’m way better at JS than at CSS, but I suck at both :smiley: , so some practice won’t hurt.

1 Like

Very useful userscript. Thanks!

I just noticed that hovering my cursor on “Burned” now turns it into “Burned+” which doesn’t make sense. Previously “Burned” does not change when you hover on it. Just “Enlightened” to “Apprentice”. Was this change intended?

Nope, unintended side effect of adding the level- mode. (clicking the grid switching between level+ and level-). Burned+ and Apprentice- aren’t suppose to show, but apparently do. Must be an issue with my CSS. I’ll check it out when I get some time.

1 Like

Seems to work well enough in Edge:

Did something change with the script? Since yesterday my grid looks like this:

Is there any way to change it back? I don’t even get the section+ readout thing is also gone, so clicking inside the grid or on specific SRS levels doesn’t change anything. I want it to look like it used to be (as show in the OP), that was really useful and neatly organized, this here is just a cluttered mess. :confused:

I recently switched to using Open Framework. When initially switching there was a bug my script that caused the script to appear like that. A fix is published though. Can you check and make sure you have the latest version installed? My first guess is tamper/violent monkey had updated to the broken version, but hasn’t grabbed the latest yet.

I have version 4.1 of your script, according to Greasy Fork that’s the newest.

Yeah that’s the latest. Odd. Just installed open framework and this script on Firefox on my phone without issue. Can’t really debug now since I’m at work.
Open framework is higher in tamper/violentmonkey? I’d think you’d get the ‘open framework not installed error’ if it wasn’t though.
Try editing the scripts setting? Possible something went won’t importing them over. ‘editing’ will make sure they’re not corrupt.
If neither of those fixes it, could you hit F12, select the console tab, and see if there’s any errors listed? You may need to F5 with the console open to get errors.

Update: What browser are you using? Also, what other scripts, styles are you using? Somewhere between creating the grids, and adding the styling, something is breaking. Either my script is failing to see on whatever setup you’re using, or something is conflicting with my addStyle(). I do see in your screenshot that it appears you have something that’s adding styling, so its possible me and some other script are conflicting with the style creations.

First of, thanks for taking your time to fix the problem, I appreciate it! :slight_smile:

I’m using GreaseMonkey on Firefox. Open Framework is higher in the list and I’m using Stylish (WaniKani Breeze Dark Beta user style). The script settings don’t give me much information, they just declare that the script is used on WaniKani/Dashboard.

The console is indeed giving me an error for your script, I hope this helps.

I hope I’m not intruding… Since this uses the Open Framework, I’m keen to follow how scripters start using it. I saw the console errors above, and knew what the problem was.

It’s is a race condition in the loading order of the Framework modules.

The first path:

wkof.ready('ItemData').then(get_items) --> srsGridStyling() --> access the settings

The second path:

wkof.ready('Settings').then(install_settings)  --> load the settings

There’s no guaranteed order there, so the settings are being used before they’re loaded.

One possible solution:

// Wait until *both* modules are loaded
wkof.ready('ItemData, Settings')
.then(install_settings) // <-- install_settings() returns a promise to finish loading.
.then(get_items);       // <-- This waits until that promise is finished,
                        //     then calls get_items().

// Once the settings are loaded, then call get_items.
function install_settings() {
    // Do all the normal stuff in this function, and then...

    // Note: I'm *return*ing the promise from the load(),
    // which means the ".then(get_items) in the wkof.ready() statement above
    // will wait until the settings_dialog.load() is finished.
    return settings_dialog.load().then(function(){
        wkof.settings.srsGrid= $.extend(true, {}, defaults,wkof.settings.srsGrid);
        settings_dialog.save();
    });;
}
3 Likes

Updated.
heads-up @rfindley, I’m rewriting my Notify script with open-framework. Got it to the point it doing its core thing, just need to work in the settings.

1 Like

I’ve added a link on the Open Framework Discussion thread.
That makes 3 of your scripts: Notify, Fast Abridged Wrong/Multiple Answers, SRS Grid Details.
Am I missing any others?