If you can do so while keeping the script short and clear, then I will appreciate your effort.
But if it requires you to maintain two implementations (one for desktop, the other for mobile), then I prefer not to waste your time, thank you.
If you can do so while keeping the script short and clear, then I will appreciate your effort.
But if it requires you to maintain two implementations (one for desktop, the other for mobile), then I prefer not to waste your time, thank you.
I assume they put a class somewhere indicating that itās mobile, so it shouldnāt be bother. Iāll look into it.
Edit: it appears they do not, but I found a regex which should do what Iām looking for.
Edit2: Ah, I see now, itās not a matter of whether itās mobile or not, itās only screen size. That makes it easier.
Edit3: Finally got the time to implement it. It was a simple change. @souvenir update and try now, I think it should work on mobile.
Great addition to WK. Thanks for maintaining this and also keeping the code clean!
Thank you ^^
Just wanted to report a small bug Iāve encountered. Iāve been on level 9 for 53 days but the counter stopped at 43. (Either that or itās 10 behind for some reason). Not that it effects many people since Iāve been taking it really slowly, and itās a minor issue, but I thought you may want to know.
Hmm. Working fine for me at 95 days (Iām on a break to focus on school). Could you double check on wkstats?
Oh, I just noticed something strange. Since I havenāt done any lessons on level 9 yet, the wkstats shows a time of zero. Your counter is still counting however, and it turns out I was looking at level 8 which is 53 days, since itās the last bar on my page I assumed it was from my current level. Sorry about that Seems everything is dandy then.
Edit: Itās adding the time to my level 8 score instead of my level 9 score. So that explains the ten day disparity also. But either way, the counter is fine.
I was referring to the WK stats page. The counter, it seems, is still counting from the day I leveled up. The ten day difference between my level 8 time on WKstats and my time on level 9 on this counter is the ten days it took me to do level 8.
Sorry for the confusion. Also, uni is the reason for my break, so I empathise. Hang in there.
Itās a bit funny, actually, because earlier in this thread oldbonsai advised me to use the started_at date (first lesson) instead, but I felt like unlocked_at (when you reached the level) was more natural.
I think that the unlocked_at date is more natural too, which is why Iām surprised to find that WK is adding it to the previous level. However Iāve been reliably informed that it shifts the time to your current level once you actually start lessons. Iāll be doing that in another couple of days so itāll be interesting to see what happens.
Since WK APIv1 doesnāt provide level-up timestamps, the current version of wkstats has to rely on radical unlock dates to guess when youāve leveled up. Unfortunately, even though radicals are unlocked when you level up, APIv1 doesnāt give me that info until you actually do a lesson. So, time is added to the prior level until you do your first lessonsā¦and then wkstats corrects the prior-level time and updates the current level.
The upcoming version of wkstats (https://www.wkstats.com:10001/) uses APIv2, which provides a lot more information, so it should (hopefully) always show accurate info about level-up.
(Iām not sure when the new version of wkstats will be done since Iām currently preoccupied with a software contract that doesnāt leave me with much spare brain power at the end of the workday).
You coded WK stats? Wow, I never knew that!
Edit: May I enter my API key and have a look?
Go for it! Itās sort of in pre-release so people can use its improved features until I get a chance to finish it.
Is there a different thread on WK I can use to report any bugs I encounter (if thatās something you want/need yet)? Though Iām aware thereās no point in bug reporting until you reach the point where youāre testing a more complete version of the site.
[Upcoming wkstats.com changes] thread has sort of become the discussion thread for the pre-release. Bug-reporting is appreciated, since the available features are mostly in their final state⦠with the exception of things related to estimated future level-ups, which is the main thing I still need to complete.
Hi @Kumirei, thanks for the script. It is really helpful.
I have a suggestion for display format. I think it will be easier to digest the information if this script use day + hour format.
Sure, Iāll make it a setting when I find the time
I tried to figure out how to do it properly with the WKOF settings menu, but that seemed tricky so I just made it simple and added a variable in the code. If you update you should now see displayHours = false
at the top of the script, just change that to true
and it will display the hours.
Not tested, but mostly cut-and-pasted from a [wkof documentation example].
// Include the Menu module, and wait for it to be ready.
wkof.include('Menu,Settings');
wkof.ready('Menu,Settings')
.then(load_settings)
.then(install_menu);
// This function is called when the Menu module is ready to use.
function install_menu() {
var config = {
name: 'level_duration_settings',
submenu: 'Settings',
title: 'Level Duration',
on_click: open_settings
};
wkof.Menu.insert_script_link(config);
}
function load_settings() {
var defaults = {
displayHours: false
};
wkof.Settings.load('level_duration', defaults);
}
function open_settings(items) {
var config = {
script_id: 'level_duration',
title: 'Level Duration',
on_save: update_display,
content: {
displayHours: {
type: 'checkbox',
label: 'Display Hours',
default: false,
hover_tip: 'Include hours in the level-duration display.',
},
}
}
var dialog = new wkof.Settings(config);
dialog.open();
}
function update_display()
{
// Put code here that redraws the display based on changed settings.
var displayHours = wkof.settings.level_duration.displayHours;
// ...
}