remove lichess.org/embed (closes lichess-org/talk#8)
parent
b6af18a3a8
commit
6e56d0cae0
|
@ -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")
|
||||
}
|
||||
|
||||
|
|
|
@ -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><script src="https://@netDomain/embed?w=1016&h=650"></script></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>
|
||||
|
||||
|
|
Loading…
Reference in New Issue