File tree Expand file tree Collapse file tree 3 files changed +23
-3
lines changed Expand file tree Collapse file tree 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+
18# version 3.1.16
29
310- 会话已过期提示
Original file line number Diff line number Diff line change 22 "name" : " vscode-leetcode-problem-rating" ,
33 "displayName" : " LeetCode" ,
44 "description" : " %main.description%" ,
5- "version" : " 3.1.16 " ,
5+ "version" : " 3.1.17 " ,
66 "author" : " ccagml" ,
77 "publisher" : " ccagml" ,
88 "license" : " MIT" ,
Original file line number Diff line number Diff line change @@ -480,11 +480,24 @@ class ExecuteService implements Disposable {
480480 title : '正确的cookie例子csrftoken="xxx"; LEETCODE_SESSION="yyy";' ,
481481 prompt : "输入例子中LEETCODE_SESSION的值yyy" ,
482482 ignoreFocusOut : true ,
483- validateInput : ( s : string ) : string | undefined => ( s ? undefined : "LEETCODE_SESSION不为空" ) ,
483+ validateInput : ( s : string ) : string | undefined => ( s && s . trim ( ) ? undefined : "LEETCODE_SESSION不为空" ) ,
484484 } ) ;
485485
486486 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+ }
488501 }
489502 // csrftoken="xxxx"; LEETCODE_SESSION="xxxx";
490503 } else {
You can’t perform that action at this time.
0 commit comments