Hope I’m the first developer who used it? The new version of Advanced Context Sentence now uses your filters.
One thing I noticed is that you don’t have a way for us to check if the script is installed of not, so I had to @require it. but this is bad since you require Wanikani Open Framework to be installed and I don’t want my script to be only runable if a certain script is installed first. so now anyone who didn’t install Wanikani Open Framework will get your script dialog every time they refresh the page
I would force Wanikani Open Framework usage, but since there are features that can be done without it (highlighting and audio, in my case), then it’s kinda bad to do
This was probably not necessary since it will be installed as long as the user has wkof (and you can just check whether they do), but I added a global variable to indicate whether the script is running. window.jlpt_joyo_freq_filters contains a boolean
I removed the alert asking the user to install wkof. If they do not have wkof then the script just won’t run. Should still be fine for my script and it should be fine for anyone using it with the self study script.
When a script needs to wait for a service to become available:
// wkof.wait_state(state_name, state_value[, callback[, persistent]])
// * If no callback, a Promise is returned
// * If persistent==true, the callback will be called each time the state
// changes to the desired value.
wkof.wait_state('ScriptA.status', 'ready', ready_callback);
This case never crossed my mind. In my current state, i think my script will break if wkof is ready but jlpt is not. Is there a way for @Kumirei to add his “ready” flag with wkof.ready? In this case i can just do wkof.readt(“Settings, Jlpt”) for example
For version 0.1.3, you added a flag to let us know your script is ready, but no flag for us to know when you’re ready to provide services. I think it’s better to follow @rfindley’s advice and go with wkof.set_state.