<commit_before><html>
<head>
<script type="text/javascript">

function storeAndClose() {

  var config = JSON.parse(document.getElementById("config").innerHTML);

  if (config.setCredentialToken) {
    var credentialToken = config.credentialToken;
    var credentialSecret = config.credentialSecret;

    var credentialString = JSON.stringify({
      credentialToken: credentialToken,
      credentialSecret: credentialSecret
    });

    window.location.hash = credentialString;

    if (window.opener && window.opener.Package &&
          window.opener.Package.oauth) {
      window.opener.Package.oauth.OAuth._handleCredentialSecret(
        credentialToken, credentialSecret);
    } else {
      try {
        localStorage[config.storagePrefix + credentialToken] = credentialSecret;
      } catch (err) {
        // We can't do much else, but at least close the popup instead
        // of having it hang around on a blank page.
      }
    }
  }

  if (! config.isCordova) {
    window.close();
  }
};
</script>
</head>
<body onload="storeAndClose()">
  <p>
    Login completed. <a href="#" onclick="window.close()">
      Click here</a> to close this window.
  </p>

  <div id="config" style="display:none;">##CONFIG##</div>
</body>
</html><commit_msg>Code review comments from arbesfeld<commit_after><html>
<head>
<script type="text/javascript">

function storeAndClose() {

  var config = JSON.parse(document.getElementById("config").innerHTML);

  if (config.setCredentialToken) {
    var credentialToken = config.credentialToken;
    var credentialSecret = config.credentialSecret;

    var credentialString = JSON.stringify({
      credentialToken: credentialToken,
      credentialSecret: credentialSecret
    });

    window.location.hash = credentialString;

    if (window.opener && window.opener.Package &&
          window.opener.Package.oauth) {
      window.opener.Package.oauth.OAuth._handleCredentialSecret(
        credentialToken, credentialSecret);
    } else {
      try {
        localStorage[config.storagePrefix + credentialToken] = credentialSecret;
      } catch (err) {
        // We can't do much else, but at least close the popup instead
        // of having it hang around on a blank page.
      }
    }
  }

  if (! config.isCordova) {
    document.getElementById("completedText").style.display = "block";
    window.close();
  }
}
</script>
</head>
<body onload="storeAndClose()">
  <p id="completedText" style="display:none;">
    Login completed. <a href="#" onclick="window.close()">
      Click here</a> to close this window.
  </p>

  <div id="config" style="display:none;">##CONFIG##</div>
</body>
</html>
{'fraction_non_alphanumeric': 0.13217522658610273, 'fraction_numerical': 0.0, 'mean_word_length': 3.3073170731707315, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, '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': '2877271', 'n_tokens_mistral': 803, 'n_tokens_neox': 775, 'n_words': 179}