mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-27 14:33:59 -04:00
Remove time from problem alert message
This commit is contained in:
parent
453960b3fb
commit
1630f7e033
1 changed files with 1 additions and 8 deletions
|
@ -18,14 +18,7 @@ module.exports = class ProblemAlertView extends CocoView
|
|||
getRenderData: (context={}) ->
|
||||
context = super context
|
||||
format = (s) -> s?.replace(/</g, '<').replace(/>/g, '>').replace(/\n/g, '<br>')
|
||||
message = @problem.aetherProblem.message
|
||||
age = @problem.aetherProblem.userInfo?.age
|
||||
if age?
|
||||
if /^Line \d+:/.test message
|
||||
message = message.replace /^(Line \d+)/, "$1, time #{age.toFixed(1)}"
|
||||
else
|
||||
message = "Time #{age.toFixed(1)}: #{message}"
|
||||
context.message = format message
|
||||
context.message = format @problem.aetherProblem.message
|
||||
context.hint = format @problem.aetherProblem.hint
|
||||
context
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue