<commit_before>package views.html
package analyse

import controllers.routes
import lila.api.{ Context, ExternalEngine }
import lila.app.templating.Environment._
import lila.app.ui.ScalatagsTemplate._

object external {
  def apply(prompt: ExternalEngine.Prompt)(implicit ctx: Context) = views.html.base.layout(
    title = "External engine",
    moreCss = cssTag("oauth"),
    moreJs = embedJsUnsafe(
      """setTimeout(() => lichess.load.then(() => {
  const btn = document.getElementById('engine-authorize');
  btn.removeAttribute('disabled');
  btn.setAttribute('class', 'button');
  btn.addEventListener('click', () => {
    lichess.storage.set('ceval.external', btn.getAttribute('data-ceval-external'));
    location.href = '/analysis';
  });
}), 2000);"""
    )
  ) {
    main(cls := "oauth box box-pad")(
      div(cls := "oauth__top")(
        img(
          cls := "oauth__logo",
          alt := "linked rings icon",
          src := assetUrl("images/icons/linked-rings.png")
        ),
        h1("External engine"),
        strong(code(prompt.url.origin))
      ),
      p("Do you want to use this external engine on your device?"),
      form3.actions(<commit_msg>add beta label to prompt<commit_after>package views.html
package analyse

import controllers.routes
import lila.api.{ Context, ExternalEngine }
import lila.app.templating.Environment._
import lila.app.ui.ScalatagsTemplate._

object external {
  def apply(prompt: ExternalEngine.Prompt)(implicit ctx: Context) = views.html.base.layout(
    title = "External engine",
    moreCss = cssTag("oauth"),
    moreJs = embedJsUnsafe(
      """setTimeout(() => lichess.load.then(() => {
  const btn = document.getElementById('engine-authorize');
  btn.removeAttribute('disabled');
  btn.setAttribute('class', 'button');
  btn.addEventListener('click', () => {
    lichess.storage.set('ceval.external', btn.getAttribute('data-ceval-external'));
    location.href = '/analysis';
  });
}), 2000);"""
    )
  ) {
    main(cls := "oauth box box-pad")(
      div(cls := "oauth__top")(
        img(
          cls := "oauth__logo",
          alt := "linked rings icon",
          src := assetUrl("images/icons/linked-rings.png")
        ),
        h1("External engine (BETA)"),
        strong(code(prompt.url.origin))
      ),
      p("Do you want to use this external engine on your device?"),
      form3.actions(
{'fraction_non_alphanumeric': 0.15824915824915825, 'fraction_numerical': 0.005050505050505051, 'mean_word_length': 3.306159420289855, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2208460', 'n_tokens_mistral': 738, 'n_tokens_neox': 718, 'n_words': 150}