Skip to content

fix leetcode.cn change payload bug and fix typo in readme #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Great thanks to leetcode.com, a really awesome website!

Read help first $ leetcode help
Login with your leetcode account $ leetcode user -l
Cookie login with cookie $ leetcode user -c
Cookie login with cookie $ leetcode user -c
Browse all questions $ leetcode list
Choose one question $ leetcode show 1 -g -l cpp
Coding it!
Expand Down
10 changes: 4 additions & 6 deletions lib/plugins/leetcode.cn.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,10 @@ plugin.getProblemsTitle = function(cb) {
'query getQuestionTranslation($lang: String) {',
' translations: allAppliedQuestionTranslations(lang: $lang) {',
' title',
' question {',
' questionId',
' questionId',
' __typename',
' }',
' }',
'}',
''
'}'
].join('\n'),
variables: {},
operationName: 'getQuestionTranslation'
Expand All @@ -116,7 +114,7 @@ plugin.getProblemsTitle = function(cb) {

const titles = [];
body.data.translations.forEach(function(x) {
titles[x.question.questionId] = x.title;
titles[x.questionId] = x.title;
});

return cb(null, titles);
Expand Down