This is a third-party script/app and is not created by the WaniKani team. By using this, you understand that it can stop working at any time or be discontinued indefinitely.
This might be a problem on my end, but I’ve downloaded a few scripts before and they work fine, so I’m not sure. Tampermonkey and all the scripts I have on it seem to be working fine, and I have WKOF, but the stages don’t show up on my dashboard even with refreshes. Is this an already-identified problem?
Thanks for any help, this script seems really useful
(EDIT: for clarification, the only script I have active is Double-Check, and that isn’t even running while in dashboard so there shouldn’t be conflicts)
If it does… try only enabling this script and WKOF, opening your dev tools console (f12 on windows and clicking on console tab), refreshing, and sending a screenshot of any red highlighted errors in the developer tools console. It’s possible I’m doing something that isn’t support in whatever browser/version you’re using.
For reference, I’m operating on a relatively new Mac with google chrome
That second error seems like the issue? it might be something with the API changes, but those happen in august by my memory so I’ll leave the brain work to the smart folks (you)
ah, I fixed the order and removed that one and it works. Sorry for wasting your time lol not sure what the issue was, probably a conflict. Coulda sworn I had that one inactive but oh well
EDIT: moral of the story, I’m very likely an idiot. However, now that it works it works (and looks) great!
just an afterthought, it might be useful and maybe even easy (not good at programming whatsoever) to call a similar array for the hover menu of radicals, kanji, vocab. From my limited knowledge it seems like you’d just repeat the function three more times, calling different stored items in the database as values? the hover menu thing would be fine too if it could interact with the site’s JS (or whatever language it is)
I will be sure to check out both scripts, they seem pretty unique. They seem like they conflict with this one though, so I’ll try both on for size. Thanks for trying to help an obviously dull human being like me
Obviously it’d look nicer if I had good SRS numbers like you, but I’ll get there someday if my procrastination doesn’t kill me
More edits: ooh, and yours is compatible with the grid too… that’s tempting
Even more edits: and I’ve used guesswork and the little bit of image manipulation I know to make it so that Kanna isn’t hiding the numbers in the burn section:
I’ve honestly not seen a script that combines both even though it just seems like copy/pasting call functions plus maybe an interaction with the hover menu (which other scripts do on a regular basis) so it’d be a cool addition
btw, cheers for the barney stinson GIF and thanks for all the help
/**
* Creates the UI elements
*/
function updateUI () {
initCSS();
createSRSTotalsContainer('apprenticeTotalsContainer', 0, 3, $('.srs-progress__stage--apprentice'));
createSRSTotalsContainer('guruTotalsContainer', 4, 5, $('.srs-progress__stage--guru'));
createSRSTotalsContainer('masterTotalsContainer', 6, 6, $('.srs-progress__stage--master'));
createSRSTotalsContainer('enlightenedTotalsContainer', 7, 7, $('.srs-progress__stage--enlightened'));
createSRSTotalsContainer('burnTotalsContainer', 8, 8, $('.srs-progress__stage--burned'));
/**
* Create the CSS style sheet and append it to the document
*/
function initCSS() {
$('head').append(`
<style>
.srsTotal {
display: inline-block !important;
margin: 0 !important;
font-size: 12px !important;
font-weight: normal !important;
color: white;
text-align: center;
}
.srsTotalDiv {
padding: 2px 0 4px 0;
height: 20px
}
.srs-progress__stages {
gap: 0;
}
.srs-progress__stage-title,
.srs-progress__subject-types {
display: none;
}
.srs-progress__stage-header {
display: flex;
justify-content: center;
}
#apprenticeTotalsContainer span {
width: 25%;
}
#guruTotalsContainer span {
width: 50%;
}
</style>
`);
}
/**
* Creates the individual srs stage total container and adds the text spans
* @param {String} id - The ID for the SRS stage total text container
* @param {Number} min - The minimum srs stage number (0 indexed) for this group
* @param {Number} max - The maximum srs stage number (0 indexed) for this group
* @param {Object} parent - The jquery DOM element to add the container to
*/
function createSRSTotalsContainer (id, min, max, parent) {
// Create the container for this srs group
const totalsContainer = $(document.createElement("div"));
totalsContainer.addClass("srsTotalDiv");
totalsContainer.attr('id', id);
parent.append(totalsContainer[0]);
for (let srsStage = min; srsStage <= max; srsStage++) {
// Create the span for this specific srs stage
const srsTotalSpan = document.createElement("span");
srsTotalSpan.className = 'srsTotal';
srsTotalSpan.innerText = min === max ? "" : wkSRSTotals[srsStage];
totalsContainer.append(srsTotalSpan);
}
}
}