File tree 3 files changed +23
-3
lines changed
3 files changed +23
-3
lines changed Original file line number Diff line number Diff line change
1
+ # version 3.1.17
2
+
3
+ - 修改题目 Tag 中 stack 的中文翻译 堆 -> 栈
4
+ - cookie 登录改为分别输入 LEETCODE_SESSION 和 csrftoken 的值, 避免格式解析失败
5
+ - 补充部分题目 tag 数据
6
+ - 更新基础的题目分数数据 resources/data.json
7
+
1
8
# version 3.1.16
2
9
3
10
- 会话已过期提示
Original file line number Diff line number Diff line change 2
2
"name" : " vscode-leetcode-problem-rating" ,
3
3
"displayName" : " LeetCode" ,
4
4
"description" : " %main.description%" ,
5
- "version" : " 3.1.16 " ,
5
+ "version" : " 3.1.17 " ,
6
6
"author" : " ccagml" ,
7
7
"publisher" : " ccagml" ,
8
8
"license" : " MIT" ,
Original file line number Diff line number Diff line change @@ -480,11 +480,24 @@ class ExecuteService implements Disposable {
480
480
title : '正确的cookie例子csrftoken="xxx"; LEETCODE_SESSION="yyy";' ,
481
481
prompt : "输入例子中LEETCODE_SESSION的值yyy" ,
482
482
ignoreFocusOut : true ,
483
- validateInput : ( s : string ) : string | undefined => ( s ? undefined : "LEETCODE_SESSION不为空" ) ,
483
+ validateInput : ( s : string ) : string | undefined => ( s && s . trim ( ) ? undefined : "LEETCODE_SESSION不为空" ) ,
484
484
} ) ;
485
485
486
486
if ( cf_v && ls_v ) {
487
- pwd = `csrftoken="${ cf_v } ";LEETCODE_SESSION="${ ls_v } ";` ;
487
+ let cf_v_t = cf_v . trim ( ) ;
488
+ let ls_v_t = ls_v . trim ( ) ;
489
+ // 判断输入的有没有 " '
490
+ let cf_flag = cf_v_t [ 0 ] == '"' || cf_v_t [ 0 ] == "'" ;
491
+ let ls_flag = ls_v_t [ 0 ] == '"' || ls_v_t [ 0 ] == "'" ;
492
+ if ( cf_flag && ls_flag ) {
493
+ pwd = `csrftoken=${ cf_v_t } ;LEETCODE_SESSION=${ ls_v_t } ;` ;
494
+ } else if ( cf_flag ) {
495
+ pwd = `csrftoken=${ cf_v_t } ;LEETCODE_SESSION="${ ls_v_t } ";` ;
496
+ } else if ( ls_flag ) {
497
+ pwd = `csrftoken="${ cf_v_t } ";LEETCODE_SESSION=${ ls_v_t } ;` ;
498
+ } else {
499
+ pwd = `csrftoken="${ cf_v_t } ";LEETCODE_SESSION="${ ls_v_t } ";` ;
500
+ }
488
501
}
489
502
// csrftoken="xxxx"; LEETCODE_SESSION="xxxx";
490
503
} else {
You can’t perform that action at this time.
0 commit comments