WKStats Levelup Fix

Fix weird issues with the levelups on wkstats that are assumed to be caused by new additions of kanji to levels

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

作者
Inserio
今日安裝
0
安裝總數
9
評價
0 0 0
版本
2.0.2
建立日期
2024-05-28
更新日期
2024-05-28
尺寸
9.3 KB
授權條款
MIT
腳本執行於

Attempts to fix the calculations of the levelups by essentially overwriting the calc_levelups() function as soon as it finishes executing for the first time.

For some reason, the original calculation could result in some very funky situations, such as negative levelup lengths. My assumption is that a cause of this is the rearranging and adding of kanji to various levels. For example, if one kanji used to be in a later level but was moved to an earlier one and therefore causes the calculations to see your levelup date for that earlier level incorrectly as the date of passing the "later" kanji.

This is primarily only for edge-case scenarios, such as long-time users who don't have data for all of their levels in the APIv2 level_progressions endpoint.

If you want to see the calculations side-by-side (or rather, one after another), comment out or delete the following line:
wklogs['levelups'].length = 0;