File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1
1
// ==UserScript==
2
2
// @name LeetCodeRating|显示力扣周赛难度分
3
3
// @namespace https://github.com/zhang-wangz
4
- // @version 1.2.8
4
+ // @version 1.2.9
5
5
// @license MIT
6
6
// @description LeetCodeRating 力扣周赛分数显现,目前支持tag页面,题库页面和题目页面
7
7
// @author 小东是个阳光蛋(力扣名
35
35
// @note 2022-09-11 1.2.6 fix当 hover题目后面的反馈按钮的时候,会不断的添加周赛link的bug
36
36
// @note 2022-09-11 1.2.7 更新具体问题页面, 题目侧边弹出页难度分显示
37
37
// @note 2022-09-12 1.2.8 重构数据标识为题目id,因为lc不计算剑指offer,lcp这种题号,id作为标识更加准确些
38
+ // @note 2022-09-12 1.2.9 修改数据唯一标识,使得用户数据缓存更新
38
39
// ==/UserScript==
39
40
40
41
( function ( ) {
229
230
t2rate = JSON . parse ( GM_getValue ( "t2ratedb" , "{}" ) . toString ( ) )
230
231
preDate = GM_getValue ( "preDate" , "" )
231
232
let now = getCurrentDate ( 1 )
232
- if ( t2rate [ "idx " ] == undefined || ( preDate == "" || preDate != now ) ) {
233
+ if ( t2rate [ "idx10 " ] == undefined || ( preDate == "" || preDate != now ) ) {
233
234
GM_xmlhttpRequest ( {
234
235
method : "get" ,
235
236
url : 'https://zerotrac.github.io/leetcode_problem_rating/data.json' ,
247
248
t2rate [ json [ i ] . ID ] = json [ i ]
248
249
t2rate [ json [ i ] . ID ] [ "Rating" ] = Number . parseInt ( Number . parseFloat ( json [ i ] [ "Rating" ] ) + 0.5 )
249
250
}
250
- t2rate [ "idx " ] = - 1
251
+ t2rate [ "idx10 " ] = - 10
251
252
console . log ( "everyday getdate once..." )
252
253
253
254
preDate = now
You can’t perform that action at this time.
0 commit comments