remove old /{puzzle,tv}/embed (replaced with /{puzzle,tv}/frame)
parent
967271f458
commit
758bae9fb2
|
@ -223,16 +223,6 @@ final class Puzzle(
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* For BC */
|
|
||||||
def embed = Action { req =>
|
|
||||||
Ok {
|
|
||||||
val bg = get("bg", req) | "light"
|
|
||||||
val theme = get("theme", req) | "brown"
|
|
||||||
val url = s"""${req.domain + routes.Puzzle.frame}?bg=$bg&theme=$theme"""
|
|
||||||
s"""document.write("<iframe src='https://$url&embed=" + document.domain + "' class='lichess-training-iframe' allowtransparency='true' frameborder='0' style='width: 224px; height: 264px;' title='Lichess free online chess'></iframe>");"""
|
|
||||||
} as JAVASCRIPT withHeaders (CACHE_CONTROL -> "max-age=86400")
|
|
||||||
}
|
|
||||||
|
|
||||||
def frame = Action.async { implicit req =>
|
def frame = Action.async { implicit req =>
|
||||||
env.puzzle.daily.get map {
|
env.puzzle.daily.get map {
|
||||||
case None => NotFound
|
case None => NotFound
|
||||||
|
|
|
@ -79,15 +79,6 @@ final class Tv(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* for BC */
|
|
||||||
def embed = Action { req =>
|
|
||||||
Ok {
|
|
||||||
val config = ui.EmbedConfig(req)
|
|
||||||
val url = s"""${req.domain + routes.Tv.frame}?bg=${config.bg}&theme=${config.board}"""
|
|
||||||
s"""document.write("<iframe src='https://$url&embed=" + document.domain + "' class='lichess-tv-iframe' allowtransparency='true' frameborder='0' style='width: 224px; height: 264px;' title='Lichess free online chess'></iframe>");"""
|
|
||||||
} as JAVASCRIPT withHeaders (CACHE_CONTROL -> "max-age=86400")
|
|
||||||
}
|
|
||||||
|
|
||||||
def frame = Action.async { implicit req =>
|
def frame = Action.async { implicit req =>
|
||||||
env.tv.tv.getBestGame map {
|
env.tv.tv.getBestGame map {
|
||||||
case None => NotFound
|
case None => NotFound
|
||||||
|
|
|
@ -18,7 +18,6 @@ GET /games/export/:username controllers.Game.exportByUser(username: S
|
||||||
|
|
||||||
# TV
|
# TV
|
||||||
GET /tv controllers.Tv.index
|
GET /tv controllers.Tv.index
|
||||||
GET /tv/embed controllers.Tv.embed
|
|
||||||
GET /tv/frame controllers.Tv.frame
|
GET /tv/frame controllers.Tv.frame
|
||||||
GET /tv/feed controllers.Tv.feed
|
GET /tv/feed controllers.Tv.feed
|
||||||
GET /tv/channels controllers.Tv.channels
|
GET /tv/channels controllers.Tv.channels
|
||||||
|
@ -84,7 +83,6 @@ POST /training/coordinate/color controllers.Coordinate.color
|
||||||
GET /training controllers.Puzzle.home
|
GET /training controllers.Puzzle.home
|
||||||
GET /training/new controllers.Puzzle.newPuzzle
|
GET /training/new controllers.Puzzle.newPuzzle
|
||||||
GET /training/daily controllers.Puzzle.daily
|
GET /training/daily controllers.Puzzle.daily
|
||||||
GET /training/embed controllers.Puzzle.embed
|
|
||||||
GET /training/frame controllers.Puzzle.frame
|
GET /training/frame controllers.Puzzle.frame
|
||||||
GET /training/export/png/:id.png controllers.Export.legacyPuzzleThumbnail(id: Int)
|
GET /training/export/png/:id.png controllers.Export.legacyPuzzleThumbnail(id: Int)
|
||||||
GET /training/export/gif/thumbnail/:id.gif controllers.Export.puzzleThumbnail(id: Int)
|
GET /training/export/gif/thumbnail/:id.gif controllers.Export.puzzleThumbnail(id: Int)
|
||||||
|
|
Loading…
Reference in New Issue