Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0165a7a

Browse files
yihong0618jdneo
authored andcommitted
fix leetcode.cn change payload bug and fix typo in readme (#32)
1 parente4bd585 commit0165a7a

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

‎README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Great thanks to leetcode.com, a really awesome website!
4040

4141
Read help first $ leetcode help
4242
Login with your leetcode account $ leetcode user -l
43-
Cookie login with cookie$ leetcode user -c
43+
Cookie login with cookie$ leetcode user -c
4444
Browse all questions $ leetcode list
4545
Choose one question $ leetcode show 1 -g -l cpp
4646
Coding it!

‎lib/plugins/leetcode.cn.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,10 @@ plugin.getProblemsTitle = function(cb) {
9797
'query getQuestionTranslation($lang: String) {',
9898
' translations: allAppliedQuestionTranslations(lang: $lang) {',
9999
' title',
100-
'question {',
101-
' questionId',
100+
'questionId',
101+
'__typename',
102102
' }',
103-
' }',
104-
'}',
105-
''
103+
'}'
106104
].join('\n'),
107105
variables:{},
108106
operationName:'getQuestionTranslation'
@@ -116,7 +114,7 @@ plugin.getProblemsTitle = function(cb) {
116114

117115
consttitles=[];
118116
body.data.translations.forEach(function(x){
119-
titles[x.question.questionId]=x.title;
117+
titles[x.questionId]=x.title;
120118
});
121119

122120
returncb(null,titles);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp