mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-14 07:00:01 -04:00
Add Done button hotkey
This commit is contained in:
parent
12f46a6f31
commit
ea61499a10
1 changed files with 4 additions and 1 deletions
|
@ -131,7 +131,10 @@ module.exports = class SpellView extends CocoView
|
|||
name: 'run-code-real-time'
|
||||
bindKey: {win: 'Ctrl-Shift-Enter', mac: 'Command-Shift-Enter|Ctrl-Shift-Enter'}
|
||||
exec: =>
|
||||
if @options.level.get('replayable') and (timeUntilResubmit = @session.timeUntilResubmit()) > 0
|
||||
doneButton = @$('.done-button:visible')
|
||||
if doneButton.length
|
||||
doneButton.trigger 'click'
|
||||
else if @options.level.get('replayable') and (timeUntilResubmit = @session.timeUntilResubmit()) > 0
|
||||
Backbone.Mediator.publish 'tome:manual-cast-denied', timeUntilResubmit: timeUntilResubmit
|
||||
else
|
||||
Backbone.Mediator.publish 'tome:manual-cast', {realTime: true}
|
||||
|
|
Loading…
Reference in a new issue