<commit_before>(function () {
  'use strict';

  // http://stackoverflow.com/questions/1403888/get-url-parameter-with-jquery
  function getURLParameter(name) {
    return decodeURI(
        (RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[,''])[1]
    );
  }

  $(document).ready(function() {
    $('.site').text(location.host + getURLParameter('next'));
    $('.hidden').removeClass('hidden');
  });

}());
<commit_msg>assertion sumbition and redirection<commit_after>(function () {
  'use strict';

  // http://stackoverflow.com/questions/1403888/get-url-parameter-with-jquery
  function getURLParameter(name) {
    return decodeURI(
        (RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[,''])[1]
    );
  }


  // http://stackoverflow.com/questions/3846271/
  // jquery-submit-post-synchronously-not-ajax
  function sendAssertion(assertion) {
    if (assertion) {
      $('body').append($('<form/>', {
        id: 'hidden-form',
        method: 'POST',
        action: 'api/browserid/verify/',
      }));

      $('#hidden-form').append($('<input/>', {
        type: 'hidden',
        name: 'assertion',
        value: assertion.toString()
      }));

      $('#hidden-form').append($('<input/>', {
        type: 'hidden',
        name: 'next',
        value: getURLParameter('next')
      }));

      $('#hidden-form').submit();
    } else {
      alert('BrowserID assertion not set');
    }
  }

  $('.site').text(location.host + getURLParameter('next'));
  $('.hidden').removeClass('hidden');
  $('#browserid').click(function() {
    navigator.id.get(sendAssertion);
    return false;
  });
}());

{'fraction_non_alphanumeric': 0.22878228782287824, 'fraction_numerical': 0.014145141451414513, 'mean_word_length': 2.9877450980392157, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '739106', 'n_tokens_mistral': 546, 'n_tokens_neox': 527, 'n_words': 67}