Skip to content

Commit

Permalink
Merge branch 'master' of github.com:pamods/PA-Stats-Server
Browse files Browse the repository at this point in the history
# By Cola_Colin
# Via Cola_Colin
* 'master' of github.com:pamods/PA-Stats-Server:
  target blank for replay links
  open help in extra tab
  do not directly link startpa:// use a redirect instead to prevent issues when posting links in forums or in chats, etc...
  • Loading branch information
Frederik Eychenie committed Apr 27, 2014
2 parents bbf3c1c + 8d15368 commit eda63b7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,10 @@ object StatisticsReportService extends RestHelper with Loggable {
}
}

serve {
case "replay" :: id :: Nil Get _ => RedirectResponse(s"startpa://replay=$id")
}

serve {
case "report" :: "getsystem" :: Nil Get _ =>
try {
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/info/nanodesu/snippet/GameInfo.scala
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ object GameInfo extends DispatchSnippet with Loggable {
"#winner *+" #> game.winner &
"#start *+" #> JSLocalTime.jsTimeSnipFor(game.startTime) &
"#length *+" #> prettyTimespan(game.duration) &
"#replaylink [href]" #> ("startpa://replay="+game.lobbyId)
"#replaylink [href]" #> ("/replay/"+game.lobbyId)

base
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/templates-hidden/gameinfo.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ <h4 id="players" style="text-align:center"></h4>
<td id="length">Duration: </td>
<td id="version">PA: v.</td>
<td> <span id="gamenum">Game #</span>
<a id="replaylink">(Launch replay in PA)</a> <a href="https://forums.uberent.com/threads/rel-pa-stats-63180.50690/page-23#post-918834">(?)</a>
<a id="replaylink" target="_blank">(Launch replay in PA)</a> <a href="https://forums.uberent.com/threads/rel-pa-stats-63180.50690/page-23#post-918834" target="_blank">(?)</a>
<span id="livenote" data-lift="GameInfo.livenote" style="display: none"><span class="white bold" id="live_note_txt"></span></span> <br />
</td>
</tr>
Expand Down

0 comments on commit eda63b7

Please sign in to comment.