<commit_before><!DOCTYPE html>
<html>
<head>
  <title>The Studio Director</title>
  <meta name='viewport' content='width=device-width, initial-scale=1'>
  <link rel='stylesheet' href='jquery.mobile-1.3.2.min.css' />
  <script src='jquery-1.9.1.min.js'></script>
  <script src='jquery.mobile-1.3.2.min.js'></script>
  <script src="cordova.js"></script>
  <script>
  var MSD = {};

  MSD.onDeviceReady = function()
  {
    $('#okButton').button("enable");
    MSD.updateListOfIDs();
    navigator.splashscreen.hide();
  }
  
  MSD.updateListOfIDs = function()
  {
    var list = MSD.getIDs();
    var html = '';

    if (list != null && list.length > 0)
    {
      var html = '<p>Or, pick one of the following previously entered studio IDs:</p><ul data-role="listview">';

      for (var i = 0; i < list.length; i++)
      {
        html += '<li><a href="javascript:MSD.gotoStudio(\'' + list[i] + '\')">' + list[i] + '</a><a href="javascript:MSD.removeID(\'' + list[i] + '\')" data-icon="delete" data-iconpos="notext"></a></li>';
      }

      html += '</ul>';
    }

    $('#prevEntered').html(html).trigger('create');
  }

  MSD.removeID = function(studioID)
  {
    var list = MSD.getIDs();
    var index = list.indexOf(studioID);

    if (index != -1)
    {
      list.splice(index, 1);
    }

    if (list.length > 0)
    {
      var studioIDs = '';
      for (var i = 0; i < list.length; i++)
      {
        if (i > 0)
        {
          studioIDs += ',';
        }
        studioIDs += list[i];
      }
      window.localStorage.setItem('studioIDs', studioIDs);
    }
    else
    {
      window.localStorage.removeItem('studioIDs');
    }

    MSD.updateListOfIDs();
  }

  MSD.getIDs = function()
  {
    var list = window.localStorage.getItem('studioIDs');

    if (list == null)
    {
      return null;
    }
    else
      return list.split(',');
  }

  MSD.saveID = function(studioID)
  {
    var list = window.localStorage.getItem('studioIDs');

    if (list == null)
    {
      window.localStorage.setItem('studioIDs', studioID);
    }
    else
    {
      if (!MSD.isInList(studioID, list))
      {
        window.localStorage.setItem('studioIDs', studioID + ',' + list);
      }
    }

    MSD.updateListOfIDs();
  }

  MSD.isInList = function(studioID, list)
  {
    if (list == null)
    {
      return false;
    }
    else
    {
      var a = list.split(',');

      for (var i = 0; i < a.length; i++)
      {
        if (studioID == a[i])
        {
          return true;
        }
      }

      return false;
    }
  }

  MSD.onOK = function()
  {
    var studioID = $('#studioID').val();

    if (MSD.isValidID(studioID))
    {
      MSD.saveID(studioID);
      MSD.gotoStudio(studioID);
    }
    else
    {
      alert('You must enter a valid studio ID.');
    }
  }

  MSD.gotoStudio = function(studioID)
  {
    var url = 'https://www.thestudiodirector.com/' + studioID.toLowerCase() + '/m.jsp';
    window.open(url, '_system', 'location=yes');
  }

  MSD.isValidID = function(studioID)
  {
    return studioID.length >= 2 && studioID.match(/^[a-zA-Z0-9]+$/);
  }
  
  document.addEventListener("deviceready", MSD.onDeviceReady, false);

  </script>
<body>

<div data-role='page'>
  <div data-role='header'>
    <img src='sdbanner.png' style='width:100%'>
  </div>
  <div data-role='content'>
    Please enter your Studio ID. You can find this ID by logging into the full site, clicking on the Admin tab, Studio Information section, Mobile App Info. 
    <input type='text' id='studioID'>
    <button type='button' id='okButton' onclick='MSD.onOK()' disabled='true'>OK</button>
    <div id='prevEntered'></div>
  </div>
</div>
</body>
</html><commit_msg>add comma so that we can see change<commit_after><!DOCTYPE html>
<html>
<head>
  <title>The Studio Director</title>
  <meta name='viewport' content='width=device-width, initial-scale=1'>
  <link rel='stylesheet' href='jquery.mobile-1.3.2.min.css' />
  <script src='jquery-1.9.1.min.js'></script>
  <script src='jquery.mobile-1.3.2.min.js'></script>
  <script src="cordova.js"></script>
  <script>
  var MSD = {};

  MSD.onDeviceReady = function()
  {
    $('#okButton').button("enable");
    MSD.updateListOfIDs();
    navigator.splashscreen.hide();
  }
  
  MSD.updateListOfIDs = function()
  {
    var list = MSD.getIDs();
    var html = '';

    if (list != null && list.length > 0)
    {
      var html = '<p>Or, pick one of the following previously entered studio IDs:</p><ul data-role="listview">';

      for (var i = 0; i < list.length; i++)
      {
        html += '<li><a href="javascript:MSD.gotoStudio(\'' + list[i] + '\')">' + list[i] + '</a><a href="javascript:MSD.removeID(\'' + list[i] + '\')" data-icon="delete" data-iconpos="notext"></a></li>';
      }

      html += '</ul>';
    }

    $('#prevEntered').html(html).trigger('create');
  }

  MSD.removeID = function(studioID)
  {
    var list = MSD.getIDs();
    var index = list.indexOf(studioID);

    if (index != -1)
    {
      list.splice(index, 1);
    }

    if (list.length > 0)
    {
      var studioIDs = '';
      for (var i = 0; i < list.length; i++)
      {
        if (i > 0)
        {
          studioIDs += ',';
        }
        studioIDs += list[i];
      }
      window.localStorage.setItem('studioIDs', studioIDs);
    }
    else
    {
      window.localStorage.removeItem('studioIDs');
    }

    MSD.updateListOfIDs();
  }

  MSD.getIDs = function()
  {
    var list = window.localStorage.getItem('studioIDs');

    if (list == null)
    {
      return null;
    }
    else
      return list.split(',');
  }

  MSD.saveID = function(studioID)
  {
    var list = window.localStorage.getItem('studioIDs');

    if (list == null)
    {
      window.localStorage.setItem('studioIDs', studioID);
    }
    else
    {
      if (!MSD.isInList(studioID, list))
      {
        window.localStorage.setItem('studioIDs', studioID + ',' + list);
      }
    }

    MSD.updateListOfIDs();
  }

  MSD.isInList = function(studioID, list)
  {
    if (list == null)
    {
      return false;
    }
    else
    {
      var a = list.split(',');

      for (var i = 0; i < a.length; i++)
      {
        if (studioID == a[i])
        {
          return true;
        }
      }

      return false;
    }
  }

  MSD.onOK = function()
  {
    var studioID = $('#studioID').val();

    if (MSD.isValidID(studioID))
    {
      MSD.saveID(studioID);
      MSD.gotoStudio(studioID);
    }
    else
    {
      alert('You must enter a valid studio ID.');
    }
  }

  MSD.gotoStudio = function(studioID)
  {
    var url = 'https://www.thestudiodirector.com/' + studioID.toLowerCase() + '/m.jsp';
    window.open(url, '_system', 'location=yes');
  }

  MSD.isValidID = function(studioID)
  {
    return studioID.length >= 2 && studioID.match(/^[a-zA-Z0-9]+$/);
  }
  
  document.addEventListener("deviceready", MSD.onDeviceReady, false);

  </script>
<body>

<div data-role='page'>
  <div data-role='header'>
    <img src='sdbanner.png' style='width:100%'>
  </div>
  <div data-role='content'>
    Please, enter your Studio ID. You can find this ID by logging into the full site, clicking on the Admin tab, Studio Information section, Mobile App Info. 
    <input type='text' id='studioID'>
    <button type='button' id='okButton' onclick='MSD.onOK()' disabled='true'>OK</button>
    <div id='prevEntered'></div>
  </div>
</div>
</body>
</html>
{'fraction_non_alphanumeric': 0.18156009192916048, 'fraction_numerical': 0.0064891172096796, 'mean_word_length': 2.437732342007435, 'pattern_counts': {'":': 0, '<': 89, '<?xml version=': 0, '>': 91, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '3452418', 'n_tokens_mistral': 2711, 'n_tokens_neox': 2635, 'n_words': 516}