Oh! actually, now it seems to work. i closed chrome and opened dashboard again… just reloading before didnt work.
thanks!
Oh! actually, now it seems to work. i closed chrome and opened dashboard again… just reloading before didnt work.
thanks!
Cool script! I just installed it (version 4.4), but for some reason I don’t get the detail figures. Any suggestions? Thanks.
There’s a setting for it.
Go to Menu → Settings → SRS Grid V2
and tick the box
Awesome. Thank you!
@DaisukeJigen I like your script, but I’m annoyed by a link to “App Store”. If I clicked that link it went to this page which has unsupported title. Well AFAIK @hitechbunny has been inactive. I’m not sure of what this link does. So I commented this code
// try { $('.app-store-menu-item').remove(); $('<li class="app-store-menu-item"><a href="https://community.wanikani.com/t/there-are-so-many-user-scripts-now-that-discovering-them-is-hard/20709">App Store</a></li>').insertBefore($('.navbar .dropdown-menu .nav-header:contains("Account")')); window.appStoreRegistry = window.appStoreRegistry || {}; window.appStoreRegistry[GM_info.script.uuid] = GM_info; localStorage.appStoreRegistry = JSON.stringify(appStoreRegistry); } catch (e) {}
And that link had disappeared.
Other than this, thanks for making this user script!
Hello @DaisukeJigen,
I have recently noticed that your script very recently started displaying only zeroes with my account:
My account history is:
Can you please suggest an action? Should I check for console errors?
Thanks
Post this in the 0/0 thread!
it is not a sort of bug that I would imagine in one of your creations
But now that you write it, in fact, I am back from hell to a healthy 0/0.
Mine’s telling me I have no apprentice items, which is wrong.
I hate to point fingers, but it’s looking possibly like this is an issue with either Open Framework, or WaniKani itself.
Around line 158 I think it was, where it says srs_bylevel = wkof.***** (or something like that, I’m not actually in front of it anymore), if you to a breakpoint/debugger right after that, what does it tell you srs_bylevel is? Mine completely lacks any apprentice data.
Hi @DaisukeJigen,
sorry for the slow response, but I am not proficient in debugging javascripts (should the breakpoint be within tampermonkey, or in the browser (Firefox) itself?)
I tried to have a few print outs from the script itself, but it did help much. I dont see the line (158) and variable you are referring to. It would help if you have a piece of debug code I can just copy-paste in my installation, and then I could share the results.
Testing from a different laptop, I am getting now partial statistics:
Script version is still 4.6, on top of FF 80 and TamperMonkey 4.11.6117
and switching back to my 1st laptop, it still shows zeroes everywhere.
The FF/TamperMonkey versions are aligned. Could it be a corrupted Db, or a race condition?
Sorry, had the variable name wrong.
// Separate the items array into srs levels
function process_items(items) {
by_srs = wkof.ItemData.get_index(items,'srs_stage_name');
debugger;
var data = {
Add in that debugger; have F12 open, and code will automatically stop there. Hover over by_srs, will show what data it holds. Mine misses all Apprentice data
@rfindley Any idea why Open Framework wouldn’t be returning everything?
// Fetch the items from WK (and/or cache)
function get_items() {
debugger;
wkof.ItemData.get_items('subjects,assignments')
.then(process_items).then(srsGridStyling);
}
...
// Separate the items array into srs levels
function process_items(items) {
by_srs = wkof.ItemData.get_index(items,'srs_stage_name');
var data = {
This attribute is deprecated and removed from the API. See here:
The relevant part is this:
We will be dropping the endpoint
/srs_stages
and the attributesassignment.srs_stage_name
,assignment.passed
,reviews.starting_srs_stage_name
andreviews.ending_srs_stage_name
on August 17, 2020 . This is a full two months to make the necessary adjustments.
Open Framework may still have data in cache from before the removal date. No data is available for recent items.
Bah, so framework was essentially doing a passthrough of sorts then eh? Poo
Yup, the framework mostly just does pass-through, other than linking the various endpoints together.
Looks like I have my work cut out for me fixing this.
You know if there’s any call I can make to get everything divided up into the 9 stages for me? Or am I just going to have to grep the ‘items’, or the like?
Going to be a few days until I get a chance to look at this at all.
Honestly, the index functions are really simple, so it’s easy to adapt to the numeric srs stages.
Give me a minute while I look up the one that indexes by srs name…
Edit: Actually, there’s an index function called “srs_stage”, so you can just use that instead.
How about
function process_items(items) { by_srs = wkof.ItemData.get_index(items,'srs_stage');
The numerical attribute for srs is srs_stage.
Heh… yep. Ninja’d!
Perfect, thanks.