Merge pull request #1140 from pomeh/1139-add-direct-link-to-levels

Resolves #1139: can use a direct permalink to a specific level
This commit is contained in:
Peter Cottle 2024-04-24 09:56:11 -04:00 committed by GitHub
commit 03a82ce78f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -237,6 +237,10 @@ var initDemo = function(sandbox) {
'levels'
];
commands = commands.join(';#').split('#'); // hax
} else if (params.hasOwnProperty('level')) {
commands = [
'level ' + unescape(params.level),
];
} else if (params.gist_level_id) {
$.ajax({
url: 'https://api.github.com/gists/' + params.gist_level_id,