In include it’s just one argument as far as I am aware, i.e. 'Menu,Settings,ItemData'. Not sure if it also works as separate arguments, but I’ve only seen it as one.
Pretty sure that unless you specify a path it’s not categorized
edit: wait, you are correct, since those are the defaults, sorry. I was thinking about when you create the settings in the menu
Just checked and I only have one argument wkof.include('Menu,Settings,ItemData,Apiv2')
That is fine, but then you will have to add paths to the settings if you want them to be separate. For example
ReverseOrder: {
type: 'checkbox',
label: 'Reverse Order?',
hover_tip: 'Reverse the order of the categories',
default: 'false',
path: '@general.ReverseOrder'
}
Else they will all be stored in wkof.settings.total_progress. If that is what you want, then you have to remove the general from the defaults object.
Those syntax errors are so worthless. So hard to figure out where the error is from that.
Your defaults objects sets wkof.settings.total_progress as
general {
setting1: ...,
setting2: ...,
...
}
So currently you have to call them as wkof.settings.total_progress.general.settingN
But in the menu they are uncategorised, so your settings object will end up with duplicates when saved
By specifying path you can make it so that the menu saves the setting inside general, or you can move the settings outside of general in the defaults and make it so that they are uncategorised.
I also just wanted to write that. It’s probably easier if you just remove general from the defaults. Then you can access the variables as you initially wanted (with wkof.settings.total_progression.LockedLessonColor), and don’t need to specify path in the settings dialog config.
The structure of the dialog box (general: {type: 'group', ...} and colors: {type: 'group', ...}) does not need to match the structure of the wkof.settings.total_progression object (or in other words: the structure is not automatically replicated and you would have to use path).
You seem to use wkof.include('Menu','Settings','ItemData') instead of wkof.include('Menu,Settings,ItemData'). So you pass three arguments instead of one string.
(I haven’t tested if this works too)
When are you trying to access wkof.settings.total_progression? Has wkof.Settings.load() finished by then? As far as I know this is an asynchronous function, so it is not guaranteed to have finished after you call load_settings().
It seems that the Open Framework automatically reverts your changes to wkof.settings.total_progression if you click “cancel”. At least it seemed to work in my ConfusionGuesser script.
EDIT: nvm, you already have several color presets in a dropdown menu
Thanks for the tips, I will look into that. I did see that fetch and update basically did nothing, so I will be trying to find a way that only refreshes my little part of the webpage. So far, I think I will give the main div a class, and just remove that class before putting the div back
Thank you for making the script!
Would it be possible to have an option that merges all the 4 apprentice levels in one, and the two guru levels? I don’t think I need to know all the different SRS stages. (I mean I can change the colors on my own but the percentages aren’t centered now. Or you could give me an option to hide the percentages, that would work too )
Edit: After I set up the colour to default WK. It’s working fine. But I can’t scroll down my page on WK Dashboard. Closed the tab. Opened a new tab. And here it is. Working fine.
I’m ok if rfindley’s bubble bubbles of turtles (WK Dashboard Progress Plus) are still showing up since I’m not 60 yet. There should prolly be option to let it clearly show rfindley’s bubbles of turtles for non 60, or not Since it’s clear I’m not 60 yet.
The most important thing for me is that kitsun default progression bar is beautifully there along with Kumi’s level by SRS. Mmm… Dreamy!