<commit_before><!DOCTYPE html>
<head>
<style>
  body {
    text-align: center;
    font-family: sans-serif;
    font-size: 18px;
  }
  #badlink {
    display: none;
  }
  #verified {
    display: none;
  }
</style>
<script src="/js/gherkin.js"></script>
<script>
var code = "{{ code }}";
var uid = "{{ uid }}";
var fxaUrl = "{{ fxa }}";

var Client = gherkin.Client;
var client = new Client(fxaUrl);
client.uid = uid;
client.verifyEmail(code)
.done(
  function () {
    document.getElementById('verified').style.display = 'block';
  },
  function (err) {
    console.log('error', err);
    document.getElementById('badlink').style.display = 'block';
  }
);

</script>

</head>
<body>
<div id="badlink">
  <h2>Could not confirm your email address</h2>
  <p class="error">The link you followed has expired.</p>
</div>

<div id="verified">
    <h3>Email verified!</h3>
    <h3>Now go to Firefox and sign in!</h3>
    <img src="/images/firefox.png" alt="firefox" />
</div><commit_msg>Read verification code from URL fragment<commit_after><!DOCTYPE html>
<head>
<style>
  body {
    text-align: center;
    font-family: sans-serif;
    font-size: 18px;
  }
  #badlink {
    display: none;
  }
  #verified {
    display: none;
  }
</style>
<script src="/js/gherkin.js"></script>
<script>
var code = "{{ code }}";
var uid = "{{ uid }}";
var fxaUrl = "{{ fxa }}";

if (!code && window.location.hash) {
  code = /code=(\w+)/.exec(window.location.hash)[1]
}

var Client = gherkin.Client;
var client = new Client(fxaUrl);
client.uid = uid;
client.verifyEmail(code)
.done(
  function () {
    document.getElementById('verified').style.display = 'block';
  },
  function (err) {
    console.log('error', err);
    document.getElementById('badlink').style.display = 'block';
  }
);

</script>

</head>
<body>
<div id="badlink">
  <h2>Could not confirm your email address</h2>
  <p class="error">The link you followed has expired.</p>
</div>

<div id="verified">
    <h3>Email verified!</h3>
    <h3>Now go to Firefox and sign in!</h3>
    <img src="/images/firefox.png" alt="firefox" />
</div>
{'fraction_non_alphanumeric': 0.19336219336219337, 'fraction_numerical': 0.008177008177008177, 'mean_word_length': 3.56140350877193, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 49, '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': '100436', 'n_tokens_mistral': 780, 'n_tokens_neox': 764, 'n_words': 177}