Skip to content
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

Resolves #1139: can use a direct permalink to a specific level #1140

Merged
merged 1 commit into from
Apr 24, 2024
Merged
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
4 changes: 4 additions & 0 deletions src/js/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,10 @@ var initDemo = function(sandbox) {
'levels'
];
commands = commands.join(';#').split('#'); // hax
} else if (params.hasOwnProperty('level')) {
commands = [
'level ' + unescape(params.level),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've not implemented checks on the params.level format/value here.

I'm not really confortable with this idea, as an app must always validate input args/user values before using them, but I've not implemented it myself to stick to the coding style for others parameters, where there is no check either.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no worries, we do some validation when we run the command and provide an error response :)

Screenshot 2024-04-24 at 9 56 30 AM

];
} else if (params.gist_level_id) {
$.ajax({
url: 'https://api.github.com/gists/' + params.gist_level_id,
Expand Down
Loading