<commit_before><!DOCTYPE html>
<html>
<head>
<style type="text/css">
  .loginStatus {text-align:right;}
  .loginItem {padding-left: 5px;}
  #qrcodeForm{border:1px solid #999; -webkit-box-shadow: 0px 0px 6px #CCC; background-color:#FFF; width:500px; height:550px; position: absolute; top:25px; left:10%; margin-left:-50px; padding:10px; border-radius:4px;}
</style>

</head>
<body>
  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
  <script type="text/javascript"    src="/jquery.qrcode.min.js"></script>

<div class="loginStatus">
  <a href="" id="login" class="loginItem"> login </a>
  <a href="/login/backdoor" id="loginBackdoor" class="loginItem"> login backdoor </a>
  <a href="/logout" id="logout" class="loginItem">logout </a>
</div>

<div id="qrcodeForm">
    <p>Scan QR Code with your Agent to login</p>
    <div id="qrcode"></div>
</div>


<H1 id='title'>Sample App</H1>

<hr>

<table id="profileTable"> </table>

<script type="text/javascript">

function onReady() {

  // TBD: detect if we are running on a mobile device, perhaps a a2p3.js client?
  var agentDirect = false

  $('#qrcodeForm').hide()
  $('#logout').hide()

  function drawProfile( profile ) {
    console.log( profile )
    Object.keys( profile ).forEach( function ( rs ) {
      $('#profileTable').append('<tr><td>' + rs + '</td><td></td><td></td></tr>')
      Object.keys( profile[rs] ).forEach( function ( item ) {
        $('#profileTable').append('<tr><td></td><td>' + item + '</td><td>' + profile[rs][item] + '</td></tr>')<commit_msg>added agent detection code<commit_after><!DOCTYPE html>
<html>
<head>
<style type="text/css">
  .loginStatus {text-align:right;}
  .loginItem {padding-left: 5px;}
  #qrcodeForm{border:1px solid #999; -webkit-box-shadow: 0px 0px 6px #CCC; background-color:#FFF; width:500px; height:550px; position: absolute; top:25px; left:10%; margin-left:-50px; padding:10px; border-radius:4px;}
</style>

</head>
<body>
  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
  <script type="text/javascript"    src="/jquery.qrcode.min.js"></script>

<div class="loginStatus">
  <a href="" id="login" class="loginItem"> login </a>
  <a href="/login/backdoor" id="loginBackdoor" class="loginItem"> login backdoor </a>
  <a href="/logout" id="logout" class="loginItem">logout </a>
</div>

<div id="qrcodeForm">
    <p>Scan QR Code with your Agent to login</p>
    <div id="qrcode"></div>
</div>


<H1 id='title'>Sample App</H1>

<hr>

<table id="profileTable"> </table>

<script type="text/javascript">

function onReady() {

  // check if are running on iOS or android, only agent platforms currently supported
  var deviceAgent = navigator.userAgent.toLowerCase()
  var iOS = deviceAgent.match(/(iphone|ipod|ipad)/)
  var isAndroid = deviceAgent.indexOf("android") > -1
  var agentDirect = iOS || isAndroid

  $('#qrcodeForm').hide()
  $('#logout').hide()

  function drawProfile( profile ) {
    console.log( profile )
    Object.keys( profile ).forEach( function ( rs ) {
      $('#profileTable').append('<tr><td>' + rs + '</td><td></td><td></td></tr>')
      Object.keys( profile[rs] ).forEach( function ( item ) {
        $('#profileTable').append('<tr><td></td><td>' + item + '</td><td>' + profile[rs][item] + '</td></tr>')
{'fraction_non_alphanumeric': 0.2111010009099181, 'fraction_numerical': 0.01789505611161662, 'mean_word_length': 4.487520798668885, 'pattern_counts': {'":': 0, '<': 97, '<?xml version=': 0, '>': 98, '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': '456168', 'n_tokens_mistral': 1201, 'n_tokens_neox': 1146, 'n_words': 260}