add support for HTTPS

pull/1979/head
Thibault Duplessis 2016-06-06 23:21:51 +02:00
parent 4bc0ebce78
commit 3e40af86c6
42 changed files with 79 additions and 86 deletions

View File

@ -169,7 +169,7 @@ object Puzzle extends LilaController {
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='http://$url&embed=" + document.domain + "' class='lichess-training-iframe' allowtransparency='true' frameBorder='0' style='width: 224px; height: 264px;' title='Lichess free online chess'></iframe>");"""
s"""document.write("<iframe src='//$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")
}

View File

@ -111,7 +111,7 @@ object Tv extends LilaController {
val bg = get("bg", req) | "light"
val theme = get("theme", req) | "brown"
val url = s"""${req.domain + routes.Tv.frame}?bg=$bg&theme=$theme"""
s"""document.write("<iframe src='http://$url&embed=" + document.domain + "' class='lichess-tv-iframe' allowtransparency='true' frameBorder='0' style='width: 224px; height: 264px;' title='Lichess free online chess'></iframe>");"""
s"""document.write("<iframe src='//$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")
}

View File

@ -12,7 +12,7 @@ trait AssetHelper { self: I18nHelper =>
val assetDomain = lila.api.Env.current.Net.AssetDomain
val assetBaseUrl = s"http://$assetDomain"
val assetBaseUrl = s"//$assetDomain"
def cdnUrl(path: String) = s"$assetBaseUrl$path"
def staticUrl(path: String) = s"$assetBaseUrl${routes.Assets.at(path)}"
@ -36,21 +36,21 @@ trait AssetHelper { self: I18nHelper =>
local = staticUrl("javascripts/vendor/jquery.min.js"))
val highchartsTag = cdnOrLocal(
cdn = "http://code.highcharts.com/4.1.4/highcharts.js",
cdn = "//code.highcharts.com/4.1.4/highcharts.js",
test = "window.Highcharts",
local = staticUrl("vendor/highcharts4/highcharts.js"))
val highchartsLatestTag = cdnOrLocal(
cdn = "http://code.highcharts.com/4.1/highcharts.js",
cdn = "//code.highcharts.com/4.1/highcharts.js",
test = "window.Highcharts",
local = staticUrl("vendor/highcharts4/highcharts-4.1.9.js"))
val highchartsMoreTag = Html {
"""<script src="http://code.highcharts.com/4.1.4/highcharts-more.js"></script>"""
"""<script src="//code.highcharts.com/4.1.4/highcharts-more.js"></script>"""
}
val momentjsTag = cdnOrLocal(
cdn = "http://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.6/moment.min.js",
cdn = "//cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.6/moment.min.js",
test = "window.moment",
local = staticUrl("vendor/moment/min/moment.min.js"))
@ -69,17 +69,17 @@ trait AssetHelper { self: I18nHelper =>
}
val tagmanagerTag = cdnOrLocal(
cdn = "http://cdnjs.cloudflare.com/ajax/libs/tagmanager/3.0.0/tagmanager.js",
cdn = "//cdnjs.cloudflare.com/ajax/libs/tagmanager/3.0.0/tagmanager.js",
test = "$.tagsManager",
local = staticUrl("vendor/tagmanager/tagmanager.js"))
val typeaheadTag = cdnOrLocal(
cdn = "http://cdnjs.cloudflare.com/ajax/libs/typeahead.js/0.11.1/typeahead.bundle.min.js",
cdn = "//cdnjs.cloudflare.com/ajax/libs/typeahead.js/0.11.1/typeahead.bundle.min.js",
test = "$.typeahead",
local = staticUrl("javascripts/vendor/typeahead.bundle.min.js"))
val fingerprintTag = Html {
"""<script src="http://cdn.jsdelivr.net/fingerprintjs2/0.7/fingerprint2.min.js"></script>"""
"""<script src="//cdn.jsdelivr.net/fingerprintjs2/0.7/fingerprint2.min.js"></script>"""
}
private def cdnOrLocal(cdn: String, test: String, local: String) = Html {

View File

@ -44,7 +44,7 @@ trait I18nHelper {
private lazy val langAnnotationsBase: String =
pool.names.keySet diff Set("fp", "kb", "le", "tp", "pi", "io") map { code =>
s"""<link rel="alternate" hreflang="$code" href="http://$code.lichess.org%"/>"""
s"""<link rel="alternate" hreflang="$code" href="//$code.lichess.org%"/>"""
} mkString ""
def langAnnotations(implicit ctx: UserContext) = Html {

View File

@ -68,7 +68,7 @@ trait StringHelper { self: NumberHelper =>
})
private def prependHttp(url: String): String =
url startsWith "http" fold (url, "http://" + url)
if (url startsWith "//") url else "//" + url
private val delocalize = new lila.common.String.Delocalizer(netDomain)

View File

@ -20,7 +20,7 @@ withLangAnnotations: Boolean = true)(body: Html)(implicit ctx: Context)
<head>
<meta charset="utf-8">
<title>@if(!isProd){ [dev] }@fullTitle.getOrElse{@title • lichess.org}</title>
<link href='http://fonts.googleapis.com/css?family=Noto+Sans:400,700|Roboto:300' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Noto+Sans:400,700|Roboto:300' rel='stylesheet' type='text/css'>
@ctx.currentBg match {
case "dark" => { @cssTag("dark.css") }
case "transp" => { @cssTag("dark.css")@cssTag("transp.css") }

View File

@ -10,7 +10,7 @@
<br />
<p>Would you like to watch<br />a live game while you wait?</p>
<br />
<script src="http://en.lichess.org/tv/embed?theme=brown&bg=light"></script>
<script src="//en.lichess.org/tv/embed?theme=brown&bg=light"></script>
<br />
<br />
<p>This can take a while,<br />maybe reload this page later!</p>

View File

@ -10,7 +10,7 @@
Add the following line to your site html:
</p>
<pre>&lt;script src="http://en.@netDomain/embed?w=1016&amp;h=650"&gt;&lt;/script&gt;</pre>
<pre>&lt;script src="https://en.@netDomain/embed?w=1016&amp;h=650"&gt;&lt;/script&gt;</pre>
<p>The <strong>w</strong> and <strong>h</strong> parameters control the width and height of the chess window.</p>
</div>
@ -22,14 +22,14 @@
<h1 id="embed-tv" class="lichess_title">Embed the Chess TV in your site</h1>
<div style="text-align: center;">
<script src="http://en.@netDomain/tv/embed?theme=wood&bg=light"></script>
<script src="//en.@netDomain/tv/embed?theme=wood&bg=light"></script>
</div>
<p>
Just add the following line to your site html:
</p>
<pre>&lt;script src="http://en.@netDomain/tv/embed?theme=brown&bg=light"&gt;&lt;/script&gt;</pre>
<pre>&lt;script src="https://en.@netDomain/tv/embed?theme=brown&bg=light"&gt;&lt;/script&gt;</pre>
<p>
Parameters:
@ -47,14 +47,14 @@
<h1 id="embed-puzzle" class="lichess_title">Embed the daily puzzle in your site</h1>
<div style="text-align: center;">
<script src="http://en.@netDomain/training/embed?theme=blue2&bg=light"></script>
<script src="//en.@netDomain/training/embed?theme=blue2&bg=light"></script>
</div>
<p>
Just add the following line to your site html:
</p>
<pre>&lt;script src="http://en.@netDomain/training/embed?theme=blue2&bg=light"&gt;&lt;/script&gt;</pre>
<pre>&lt;script src="https://en.@netDomain/training/embed?theme=blue2&bg=light"&gt;&lt;/script&gt;</pre>
<p>
Parameters:
@ -89,16 +89,16 @@
<h1 id="use-api" class="lichess_title">Lichess Widgets</h1>
<p>Let your website/blog visitors know that you're playing on lichess!</p>
<br />
<link rel="stylesheet" href="http://rubenwardy.github.io/lichess_widgets/lichess_widgets.css" />
<link rel="stylesheet" href="//rubenwardy.github.io/lichess_widgets/lichess_widgets.css" />
@if(ctx.currentBg == "dark") {
<link rel="stylesheet" href="http://rubenwardy.github.io/lichess_widgets/dark.css" />
<link rel="stylesheet" href="//rubenwardy.github.io/lichess_widgets/dark.css" />
} else {
<link rel="stylesheet" href="http://rubenwardy.github.io/lichess_widgets/light.css" />
<link rel="stylesheet" href="//rubenwardy.github.io/lichess_widgets/light.css" />
}
<script src="http://rubenwardy.github.io/lichess_widgets/lichess_widgets.js"></script>
<script src="//rubenwardy.github.io/lichess_widgets/lichess_widgets.js"></script>
@defining(ctx.me.fold("thibault")(_.id)) { userId =>
<script>lichess_widgets.profile_scores("@ctx.currentBg", "@userId");</script>
}
<p><a href="http://rubenwardy.github.io/lichess_widgets/">See more examples and installation instructions</a></p>
<p><a href="//rubenwardy.github.io/lichess_widgets/">See more examples and installation instructions</a></p>
</div>
}

View File

@ -10,7 +10,7 @@
<meta content="noindex, nofollow" name="robots">
</head>
<body>
<h1><a href="http://lichess.org">lichess<span class="extension">.org</span></a> network</h1>
<h1><a href="//lichess.org">lichess<span class="extension">.org</span></a> network</h1>
<div id="worldmap"></div>
<div id="legend">
<h1>Map of live games</h1>

View File

@ -14,7 +14,7 @@
<a class="@active.active("public")" href="@routes.Study.byOwnerPublic(user.username, order.key)">Public studies</a>
<a class="@active.active("private")" href="@routes.Study.byOwnerPrivate(user.username, order.key)">Private studies</a>
<a class="@active.active("likes")" href="@routes.Study.byLikes(user.username, order.key)">Liked studies</a>
<a class="text" data-icon="" href="http://lichess.org/blog/V0KrLSkAAMo3hsi4/study-chess-the-lichess-way">What are studies?</a>
<a class="text" data-icon="" href="//lichess.org/blog/V0KrLSkAAMo3hsi4/study-chess-the-lichess-way">What are studies?</a>
}
@base.layout(

View File

@ -26,13 +26,13 @@
@if(tour.createdBy == "lichess") {
@tour.id match {
case "summer15" => {
<a href="http://lichess.org/blog/VbTcnx4AAIcBvGp7/lichess-summer-marathon-tournament">About</a>
<a href="//lichess.org/blog/VbTcnx4AAIcBvGp7/lichess-summer-marathon-tournament">About</a>
}
case "autumn15" => {
<a href="http://lichess.org/blog/VgGZWB0AAOsAO6ow/autumn-marathon-tournament">About</a>
<a href="//lichess.org/blog/VgGZWB0AAOsAO6ow/autumn-marathon-tournament">About</a>
}
case "winter15" => {
<a href="http://lichess.org/blog/VmsiuSQAALImmWG5/winter-marathon-tournament">About</a>
<a href="//lichess.org/blog/VmsiuSQAALImmWG5/winter-marathon-tournament">About</a>
}
case _ => {
@trans.tournamentOfficial()

View File

@ -20,7 +20,7 @@
@gameFenNoCtx(pov, tv = true, blank = true)
@game.vstext(pov)(none)
</div>
<script src="http://code.jquery.com/jquery-2.1.3.min.js"></script>
<script src="//code.jquery.com/jquery-2.1.3.min.js"></script>
@jsTag("vendor/chessground.min.js")
@jsTagCompiled("tv.js")
@base.ga()

View File

@ -15,14 +15,14 @@
<iframe
frameborder="0"
scrolling="no"
src="http://twitch.tv/@s.streamId/chat?popout="
src="//twitch.tv/@s.streamId/chat?popout="
height="418"></iframe>
}
case lila.tv.StreamerList.Hitbox => {
<iframe
width="330"
height="392"
src="http://www.hitbox.tv/embedchat/@s.streamId"
src="//www.hitbox.tv/embedchat/@s.streamId"
frameborder="0"
allowfullscreen></iframe>
}
@ -53,7 +53,7 @@ moreCss = moreCss) {
@s.streamer.service match {
case lila.tv.StreamerList.Twitch => {
<iframe
src="http://player.twitch.tv/?channel=@s.streamId"
src="//player.twitch.tv/?channel=@s.streamId"
width="694"
height="418"
allowfullscreen autoplay></iframe>
@ -62,7 +62,7 @@ moreCss = moreCss) {
<iframe
width="694"
height="391"
src="http://hitbox.tv/#!/embed/@s.streamId?autoplay=true"
src="//hitbox.tv/#!/embed/@s.streamId?autoplay=true"
frameborder="0" allowfullscreen></iframe>
}
case lila.tv.StreamerList.Youtube => {

View File

@ -15,7 +15,7 @@ more = video.tags.map("video:tag" -> _)).some) {
<a class="is4 text lichess_title" data-icon="i" href="@routes.Video.index?@control.queryString">Video library</a>
</div>
<iframe id="ytplayer" type="text/html" width="792" height="482"
src="http://www.youtube.com/embed/@video.id?autoplay=1&origin=http://lichess.org&start=@video.startTime"
src="//www.youtube.com/embed/@video.id?autoplay=1&origin=http://lichess.org&start=@video.startTime"
frameborder="0" allowfullscreen></iframe>
<h1 class="title">@video.title</h1>
<div class="meta">

View File

@ -302,7 +302,7 @@ report {
i18n {
web_path.relative = ${app.web_path}/trans
file_path.relative = "modules/i18n/messages"
upstream.url_pattern = "http://en.lichess.org/translation/fetch/%d"
upstream.url_pattern = "https://en.lichess.org/translation/fetch/%d"
hide_calls.cookie {
name="hide_i18n_calls"
max_age=604800 # one week

@ -1 +1 @@
Subproject commit cbf549450c2de1cc18399d788c1aa05bb96fbdb2
Subproject commit 09ca4386641d362965c2a5e5b3df1722040bd177

View File

@ -17,8 +17,6 @@ object HTTPRequest {
def isRedirectable(req: RequestHeader) = isSynchronousHttp(req) && isSafe(req)
def fullUrl(req: RequestHeader): String = "http://" + req.host + req.uri
def userAgent(req: RequestHeader): Option[String] = req.headers get HeaderNames.USER_AGENT
val isAndroid = UaMatcher("""(?i).*android.+mobile.*""".r)

View File

@ -123,7 +123,7 @@ case class PlayerAggregateAssessment(
def reportText(maxGames: Int = 10): String = {
val gameLinks: String = (playerAssessments.sortBy(-_.assessment.id).take(maxGames).map { a =>
a.assessment.emoticon + " http://lichess.org/" + a.gameId + "/" + a.color.name
a.assessment.emoticon + " //lichess.org/" + a.gameId + "/" + a.color.name
}).mkString("\n")
s"""[AUTOREPORT]

View File

@ -30,7 +30,7 @@ object Statistics {
// ups all values by 5 (0.5s)
// as to avoid very high variation on bullet games
// where all move times are low (http://en.lichess.org/@/AlisaP?mod)
// where all move times are low (https://en.lichess.org/@/AlisaP?mod)
def moveTimeCoefVariation(a: NonEmptyList[Int]): Double = coefVariation(a.map(5+))
def moveTimeCoefVariation(pov: lila.game.Pov): Option[Double] =

View File

@ -30,7 +30,7 @@ object Metric {
import Entry.{ BSONFields => F }
case object MeanCpl extends Metric("acpl", "Average centipawn loss", F moves "c", Move, Move, Average,
Html("""Precision of your moves. Lower is better. <a href="http://lichess.org/qa/103/what-is-average-centipawn-loss">More info</a>"""))
Html("""Precision of your moves. Lower is better. <a href="//lichess.org/qa/103/what-is-average-centipawn-loss">More info</a>"""))
case object Movetime extends Metric("movetime", "Move time", F moves "t", Move, Move, Seconds,
Dimension.MovetimeRange.description)

View File

@ -23,9 +23,7 @@ object PovToEntry {
def apply(game: Game, userId: String, provisional: Boolean): Fu[Either[Game, Entry]] =
enrich(game, userId, provisional) map
(_ flatMap convert toRight game) addFailureEffect { e =>
println(s"http://l.org/${game.id}")
}
(_ flatMap convert toRight game)
private def removeWrongAnalysis(game: Game): Boolean = {
if (game.metadata.analysed && !game.analysable) {
@ -122,7 +120,7 @@ object PovToEntry {
!board.hasPiece(chess.Piece(color, chess.Queen))
}
case _ =>
logger.warn(s"http://l.org/${from.pov.game.id} missing endgame board")
logger.warn(s"https://lichess.org/${from.pov.game.id} missing endgame board")
false
}
}

View File

@ -92,7 +92,7 @@ case class Pref(
object Pref {
val defaultBgImg = "http://lichess1.org/assets/images/background/landscape.jpg"
val defaultBgImg = "//lichess1.org/assets/images/background/landscape.jpg"
object Tag {
val verifyTitle = "verifyTitle"

View File

@ -44,7 +44,4 @@ private[qa] final class Notifier(notifyApi: NotifyApi,
val msg = Propagate(QaComment(u.id, q.id, q.title, c.id))
timeline ! (msg toFollowersOf u.id toUser a.userId exceptUser u.id)
}
private def questionUrl(q: Question) =
s"http://lichess.org/qa/${q.id}/${q.slug}"
}

View File

@ -24,7 +24,7 @@ private[round] final class CheatDetector(reporter: ActorSelection) {
}
}
private def gameUrl(gameId: String) = s"http://lichess.org/${gameId}"
private def gameUrl(gameId: String) = s"https://lichess.org/${gameId}"
private val TURNS_MODULUS = 10

View File

@ -151,7 +151,7 @@ private[round] final class Round(
case HoldAlert(playerId, mean, sd, ip) => handle(playerId) { pov =>
!pov.player.hasHoldAlert ?? {
lila.log("cheat").info(s"hold alert $ip http://lichess.org/${pov.gameId}/${pov.color.name}#${pov.game.turns} ${pov.player.userId | "anon"} mean: $mean SD: $sd")
lila.log("cheat").info(s"hold alert $ip https://lichess.org/${pov.gameId}/${pov.color.name}#${pov.game.turns} ${pov.player.userId | "anon"} mean: $mean SD: $sd")
lila.mon.cheat.holdAlert()
proxy.bypass(_.setHoldAlert(pov, mean, sd)) inject List.empty[Event]
}

View File

@ -44,6 +44,6 @@ object StepBuilder {
private val logChessError = (id: String) => (err: String) => {
val path = if (id == "synthetic") "analysis" else id
logger.info(s"http://lichess.org/$path ${err.lines.toList.headOption | "?"}")
logger.info(s"https://lichess.org/$path ${err.lines.toList.headOption | "?"}")
}
}

View File

@ -121,5 +121,5 @@ object TreeBuilder {
}
private val logChessError = (id: String) => (err: String) =>
logger.warn(s"round.TreeBuilder http://lichess.org/$id ${err.lines.toList.headOption}")
logger.warn(s"round.TreeBuilder https://lichess.org/$id ${err.lines.toList.headOption}")
}

View File

@ -71,7 +71,7 @@ final class SlackApi(
def userMod(user: User, mod: User): Funit = client(SlackMessage(
username = mod.username,
icon = "oncoming_police_car",
text = s"Let's have a look at <http://lichess.org/@/${user.username}?mod>",
text = s"Let's have a look at <//lichess.org/@/${user.username}?mod>",
channel = "tavern"))
def deployPre: Funit =

View File

@ -67,7 +67,7 @@ private[tournament] final class TournamentApi(
tour.system.pairingSystem.createPairings(tour, users, ranking).flatMap {
case Nil => funit
case pairings if nowMillis - startAt > 1000 =>
pairingLogger.warn(s"Give up making http://lichess.org/tournament/${tour.id} ${pairings.size} pairings in ${nowMillis - startAt}ms")
pairingLogger.warn(s"Give up making https://lichess.org/tournament/${tour.id} ${pairings.size} pairings in ${nowMillis - startAt}ms")
funit
case pairings => pairings.map { pairing =>
PairingRepo.insert(pairing) >>
@ -81,7 +81,7 @@ private[tournament] final class TournamentApi(
val time = nowMillis - startAt
lila.mon.tournament.pairing.createTime(time.toInt)
if (time > 100)
pairingLogger.debug(s"Done making http://lichess.org/tournament/${tour.id} in ${time}ms")
pairingLogger.debug(s"Done making https://lichess.org/tournament/${tour.id} in ${time}ms")
}
}
}

View File

@ -160,5 +160,5 @@ object PairingSystem extends AbstractPairingSystem {
preps
}
private def url(tourId: String) = s"http://lichess.org/tournament/$tourId"
private def url(tourId: String) = s"//lichess.org/tournament/$tourId"
}

View File

@ -23,14 +23,14 @@ object Trophy {
key = "zugMiracle",
name = "Zug miracle",
icon = none,
url = "http://lichess.org/qa/259/how-do-you-get-a-zug-miracle-trophy".some,
url = "//lichess.org/qa/259/how-do-you-get-a-zug-miracle-trophy".some,
none)
object WayOfBerserk extends Kind(
key = "wayOfBerserk",
name = "The way of Berserk",
icon = "`".some,
url = "http://lichess.org/qa/340/way-of-berserk-trophy".some,
url = "//lichess.org/qa/340/way-of-berserk-trophy".some,
"fire_trophy".some)
object MarathonWinner extends Kind(
@ -65,14 +65,14 @@ object Trophy {
key = "marathonSurvivor",
name = "Marathon #1 survivor",
icon = ",".some,
url = "http://lichess.org/blog/VXF45yYAAPQgLH4d/chess-marathon-1".some,
url = "//lichess.org/blog/VXF45yYAAPQgLH4d/chess-marathon-1".some,
"fire_trophy".some)
object BongcloudWarrior extends Kind(
key = "bongcloudWarrior",
name = "Bongcloud Warrior",
icon = "~".some,
url = "http://lichess.org/forum/lichess-feedback/bongcloud-trophy".some,
url = "//lichess.org/forum/lichess-feedback/bongcloud-trophy".some,
"fire_trophy".some)
object Developer extends Kind(
@ -86,21 +86,21 @@ object Trophy {
key = "moderator",
name = "Lichess moderator",
icon = "&#xe002;".some,
url = "http://lichess.org/report".some,
url = "//lichess.org/report".some,
"icon3d".some)
object Donor extends Kind(
key = "donor",
name = "Lichess donor",
icon = "&#xe001;".some,
url = "http://lichess.org/donate".some,
url = "//lichess.org/donate".some,
"icon3d".some)
object Streamer extends Kind(
key = "streamer",
name = "Lichess streamer",
icon = "&#xe003;".some,
url = "http://lichess.org/help/stream-on-lichess".some,
url = "//lichess.org/help/stream-on-lichess".some,
"icon3d".some)
val all = List(

View File

@ -1,10 +1,10 @@
<div style='z-index: 999999; border: 1px solid #F7941D; padding: 5px 0 0 5px; background: #FEEFDA; text-align: center; clear: both; height: 75px; position: absolute;top:24px;right:0'>
<div style='position: absolute; right: 3px; top: 3px; font-family: courier new; font-weight: bold;'>
<a href='#' onclick='javascript:this.parentNode.parentNode.style.display="none"; return false;'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-cornerx.jpg' style='border: none;' alt='Close this notice'/></a>
<a href='#' onclick='javascript:this.parentNode.parentNode.style.display="none"; return false;'><img src='//www.ie6nomore.com/files/theme/ie6nomore-cornerx.jpg' style='border: none;' alt='Close this notice'/></a>
</div>
<div style='width: 916px; margin: 0 auto; text-align: left; padding: 0; overflow: hidden; color: black;'>
<div style='width: 75px; float: left;'>
<img src='http://www.ie6nomore.com/files/theme/ie6nomore-warning.jpg' alt='Warning!'/>
<img src='//www.ie6nomore.com/files/theme/ie6nomore-warning.jpg' alt='Warning!'/>
</div>
<div style='width: 496px; margin-right: 15px; float: left; font-family: Arial, sans-serif;'>
<div style='font-size: 16px; font-weight: bold; margin-top: 10px;'>
@ -16,10 +16,10 @@
</div>
</div>
<div style='width: 80px; float: left;'>
<a href='http://www.mozilla.org/firefox' target='_blank'><img src='/assets/images/browser-firefox.png' style='border: none;' alt='Get Firefox'/></a>
<a href='//www.mozilla.org/firefox' target='_blank'><img src='/assets/images/browser-firefox.png' style='border: none;' alt='Get Firefox'/></a>
</div>
<div style='width: 80px; float: left;'>
<a href='http://www.google.com/chrome' target='_blank'><img src='/assets/images/browser-chrome.png' style='border: none;' alt='Get Google Chrome'/></a>
<a href='//www.google.com/chrome' target='_blank'><img src='/assets/images/browser-chrome.png' style='border: none;' alt='Get Google Chrome'/></a>
</div>
</div>
</div>

View File

@ -110,7 +110,7 @@ lichess.notifyApp = (function() {
document.cookie = cookie;
}
}
var href = 'http://' + location.hostname + '/' + url.replace(/^\//, '');
var href = '//' + location.hostname + '/' + url.replace(/^\//, '');
$.redirect.inProgress = href;
location.href = href;
};
@ -977,7 +977,7 @@ lichess.notifyApp = (function() {
$.urlToLink = function(text) {
var exp = /\bhttp:\/\/(?:[a-z]{0,3}\.)?(lichess\.org[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig;
return text.replace(exp, "<a href='http://$1'>$1</a>");
return text.replace(exp, "<a href='//$1'>$1</a>");
}
function startTournamentClock() {

View File

@ -35,7 +35,7 @@ lichess.studyTourChapter = function(study) {
}, {
title: "Load an existing lichess game",
text: "Paste a lichess game URL<br>" +
"(like http://lichess.org/7fHIU0XI)<br>" +
"(like //lichess.org/7fHIU0XI)<br>" +
"to load the game moves in the chapter.",
attachTo: '.study_overboard .study_tabs .game top',
when: onTab('game')

View File

@ -70,7 +70,7 @@ lichess.studyTour = function(study) {
} : null, {
title: "Thanks for your time",
text: "You can find your <a href='/@/" + study.userId + "/study'>previous studies</a> from your profile page.<br>" +
"There is also a <a href='http://lichess.org/blog/V0KrLSkAAMo3hsi4/study-chess-the-lichess-way'>blog post about studies</a>.<br>" +
"There is also a <a href='//lichess.org/blog/V0KrLSkAAMo3hsi4/study-chess-the-lichess-way'>blog post about studies</a>.<br>" +
"Have fun!",
buttons: [{
text: 'Done',

View File

@ -129,7 +129,7 @@ window.addEventListener('blur', function() {
});
lichess.desktopNotification = function(msg) {
var title = 'lichess.org';
var icon = 'http://lichess1.org/assets/images/logo.256.png';
var icon = '//lichess1.org/assets/images/logo.256.png';
var notify = function() {
var notification = new Notification(title, {
icon: icon,

View File

@ -8,7 +8,7 @@
font-family: 'PT Serif';
font-style: italic;
font-weight: 400;
src: local('PT Serif Italic'), local('PTSerif-Italic'), url(http://fonts.gstatic.com/s/ptserif/v8/03aPdn7fFF3H6ngCgAlQzPk_vArhqVIZ0nv9q090hN8.woff2) format('woff2');
src: local('PT Serif Italic'), local('PTSerif-Italic'), url(//fonts.gstatic.com/s/ptserif/v8/03aPdn7fFF3H6ngCgAlQzPk_vArhqVIZ0nv9q090hN8.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
html, body {
@ -31,10 +31,10 @@
It will be back very soon. Thanks for your patience.
<br />
<br />
<a href="http://lichess.org">Return to lichess homepage</a>
<a href="//lichess.org">Return to lichess homepage</a>
<br />
<br />
<img src="http://lichess1.org/assets/images/maintenance.jpg" />
<img src="//lichess1.org/assets/images/maintenance.jpg" />
<script>setTimeout(function() { location.reload(); }, 10000);</script>
</body>
</html>

View File

@ -8,7 +8,7 @@
font-family: 'PT Serif';
font-style: italic;
font-weight: 400;
src: local('PT Serif Italic'), local('PTSerif-Italic'), url(http://fonts.gstatic.com/s/ptserif/v8/03aPdn7fFF3H6ngCgAlQzPk_vArhqVIZ0nv9q090hN8.woff2) format('woff2');
src: local('PT Serif Italic'), local('PTSerif-Italic'), url(//fonts.gstatic.com/s/ptserif/v8/03aPdn7fFF3H6ngCgAlQzPk_vArhqVIZ0nv9q090hN8.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
html, body {
@ -37,7 +37,7 @@
<h1>lichess.org is down</h1>
<p>We expect to be back very soon. Thanks for your patience.</p>
<img id="robot"
src="http://lichess1.org/assets/images/maintenance.jpg"
src="//lichess1.org/assets/images/maintenance.jpg"
alt="Lichess maintenance"
width="1000px"
height="958px" />

View File

@ -8,7 +8,7 @@
font-family: 'PT Serif';
font-style: italic;
font-weight: 400;
src: local('PT Serif Italic'), local('PTSerif-Italic'), url(http://fonts.gstatic.com/s/ptserif/v8/03aPdn7fFF3H6ngCgAlQzPk_vArhqVIZ0nv9q090hN8.woff2) format('woff2');
src: local('PT Serif Italic'), local('PTSerif-Italic'), url(//fonts.gstatic.com/s/ptserif/v8/03aPdn7fFF3H6ngCgAlQzPk_vArhqVIZ0nv9q090hN8.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
html, body {
@ -29,7 +29,7 @@
Try to reload the page soon to see if it's getting better.
<br />
<br />
<img src="http://lichess1.org/assets/images/maintenance.jpg" alt="Lichess timeout" />
<img src="//lichess1.org/assets/images/maintenance.jpg" alt="Lichess timeout" />
<script>
setTimeout(
function() { location.reload(); },

View File

@ -16,8 +16,8 @@
<body>
<h1>lichess.org - too many requests</h1>
<p>You have sent too many requests! Try again later.</p>
<p><a href="http://lichess.org">Return to lichess.org homepage</a></p>
<img src="http://lichess1.org/assets/images/429.jpg" alt="Too many requests" />
<p><a href="//lichess.org">Return to lichess.org homepage</a></p>
<img src="//lichess1.org/assets/images/429.jpg" alt="Too many requests" />
</body>
</html>

View File

@ -61,7 +61,7 @@ time {
font-family: 'PT Serif';
font-style: italic;
font-weight: 400;
src: local('PT Serif Italic'), local('PTSerif-Italic'), url(http://fonts.gstatic.com/s/ptserif/v8/03aPdn7fFF3H6ngCgAlQzPk_vArhqVIZ0nv9q090hN8.woff2) format('woff2');
src: local('PT Serif Italic'), local('PTSerif-Italic'), url(//fonts.gstatic.com/s/ptserif/v8/03aPdn7fFF3H6ngCgAlQzPk_vArhqVIZ0nv9q090hN8.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
.is::before,

View File

@ -26,7 +26,7 @@ module.exports = function(opts) {
steps: [{
title: "Racing Kings",
content: "This is a game of racing kings. " +
'You might want to check out <a target="_blank" href="http://lichess.org/variant/racing-kings">the rules</a>.',
'You might want to check out <a target="_blank" href="https://lichess.org/variant/racing-kings">the rules</a>.',
target: "div.game_infos .variant-link",
placement: "bottom"
}]
@ -44,7 +44,7 @@ module.exports = function(opts) {
steps: [{
title: "Crazyhouse",
content: "This is a game of crazyhouse. " +
'You might want to check out <a target="_blank" href="http://lichess.org/variant/crazyhouse">the rules</a>.',
'You might want to check out <a target="_blank" href="https://lichess.org/variant/crazyhouse">the rules</a>.',
target: "div.game_infos .variant-link",
placement: "bottom"
}]