diff --git a/app/views/play/common/ladder_submission_view.coffee b/app/views/play/common/ladder_submission_view.coffee index 9a0052647..ccb3571a3 100644 --- a/app/views/play/common/ladder_submission_view.coffee +++ b/app/views/play/common/ladder_submission_view.coffee @@ -72,6 +72,9 @@ module.exports = class LadderSubmissionView extends CocoView transpileSession: -> submittedCode = @session.get('code') + language = @session.get('codeLanguage') or 'javascript' + @session.set('submittedCodeLanguage', language) + @session.save() # TODO: maybe actually use a callback to make sure this works? transpiledCode = {} for thang, spells of submittedCode transpiledCode[thang] = {} @@ -80,7 +83,7 @@ module.exports = class LadderSubmissionView extends CocoView #DRY this aetherOptions = problems: {} - language: "javascript" + language: language functionName: spellID functionParameters: [] yieldConditionally: spellID is "plan" diff --git a/app/views/play/ladder/ladder_view.coffee b/app/views/play/ladder/ladder_view.coffee index 9d40389b6..884c72d63 100644 --- a/app/views/play/ladder/ladder_view.coffee +++ b/app/views/play/ladder/ladder_view.coffee @@ -65,7 +65,7 @@ module.exports = class LadderView extends RootView @insertSubView(@simulateTab = new SimulateTabView()) @refreshInterval = setInterval(@fetchSessionsAndRefreshViews.bind(@), 20 * 1000) hash = document.location.hash[1..] if document.location.hash - if hash and not (hash in ['my-matches', 'simulate', 'ladder']) + if hash and not (hash in ['my-matches', 'simulate', 'ladder', 'prizes', 'rules']) @showPlayModal(hash) if @sessions.loaded fetchSessionsAndRefreshViews: ->