remove lichess.org/embed (closes lichess-org/talk#8)

pull/4914/head
Niklas Fiekas 2019-02-21 23:10:57 +01:00
parent b6af18a3a8
commit 6e56d0cae0
2 changed files with 1 additions and 17 deletions

View File

@ -54,7 +54,7 @@ object Main extends LilaController {
def embed = Action { req =>
Ok {
s"""document.write("<iframe src='${Env.api.Net.BaseUrl}?embed=" + document.domain + "' class='lichess-iframe' allowtransparency='true' frameBorder='0' style='width: ${getInt("w", req) | 820}px; height: ${getInt("h", req) | 650}px;' title='Lichess free online chess'></iframe>");"""
s"""document.write('Sorry, embedding <a href="https://lichess.org">lichess.org</a> is now restricted to <a href="https://lichess.org/developers">selected widgets</a>, to prevent <a href="https://en.wikipedia.org/wiki/Clickjacking">clickjacking</a>.');"""
} as JAVASCRIPT withHeaders (CACHE_CONTROL -> "max-age=86400")
}

View File

@ -7,22 +7,6 @@
@base.layout(title = "Developers") {
<div class="content_box small_box">
<h1 class="lichess_title">Embed lichess in your site</h1>
<p>
Do you have a website, and want to add a playable live chess section?<br />
Add the following line to your site html:
</p>
<pre>&lt;script src="https://@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>
<br />
<br />
<div class="content_box small_box developers">
<h1 id="embed-tv" class="lichess_title">Embed the Chess TV in your site</h1>