WKStats Levelup Fix

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

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 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;