<commit_before><!DOCTYPE html>
<html>
<head>
    <title>Build Watcher</title>
    <meta name="viewport" content="width=device-width, initial-scale=1"> 
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/bootstrap-responsive.min.css" rel="stylesheet">
    <link href="css/main.css" rel="stylesheet">
    <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
    <script type="text/javascript" charset="utf-8" src="js/webtoolkit.base64.js"></script>



    <script type="text/javascript">

    var baseURL = "https://build.phonegap.com";
    var appApiPath = "/api/v1/me";

    $(document).ready(function() {
      console.log("Page Started");
      $('#login').submit( function(){
   	     	event.preventDefault();
          console.log("Login Attempted");
          var username = $('#username').val();
          var password = $('#password').val();
          console.log(username);
          testLogin(username, password);
         
      	});
    });


    function storeCredentials(username, password, token){
      localStorage.setItem('username', username);
      localStorage.setItem('password', password);
      localStorage.setItem('token', token);
    }

    function testLogin(username, password ){
      console.log("Login Test started");
      $('#message').html('Attempting login <i class="icon-cog status-indicator"></i>' );
      $('#message').addClass('label-info');

        $.ajax({
          url: baseURL + appApiPath,
          type:"get",
          error: errorHandler,
          success: handleSuccess,
          headers:{
              "Authorization": make_basic_auth(username,password)
          },       
          cache:false,
          crossDomain:true
        });



    }

    function handleSuccess(response, status, jqXHR){
      console.log(response);
      console.log(status);
      var username = $('#username').val();
      var password = $('#password').val();
      storeCredentials(username,password,response.token);
      window.location.href = "list.html";
    }

    function errorHandler(error){
      $('#message').removeClass('label-info');
      $('#message').addClass('label-warning');
      $('#message').html("Check your username and password." );
      console.log("Login Error");
      console.log(error);
    }


    </script>

</head>    
<body>
	<div class="navbar navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container">
          <a class="brand" href="./index.html">PhoneGap Build Watcher</a>
        </div>
      </div>
    </div>

    <div class="container">
		<form id="login" class="well">
      <p id="message" class="label">Login with your PhoneGap Build Details.</p>
			<label for="username">Username:</label>
			<input type="email" name="username" id="username" />

			<label for="password">Password:</label>
			<input type="password" name="password" id="password" />
			<br />
			<input id="loginsubmit" type="submit" value="Login!" >
		</form>
	</div>
</body>
</html><commit_msg>Tweaked some of the login css.<commit_after><!DOCTYPE html>
<html>
<head>
    <title>Build Watcher</title>
    <meta name="viewport" content="width=device-width, initial-scale=1"> 
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/bootstrap-responsive.min.css" rel="stylesheet">
    <link href="css/main.css" rel="stylesheet">
    <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
    <script type="text/javascript" charset="utf-8" src="js/webtoolkit.base64.js"></script>



    <script type="text/javascript">

    var baseURL = "https://build.phonegap.com";
    var appApiPath = "/api/v1/me";

    $(document).ready(function() {
      console.log("Page Started");
      $('#login').submit( function(){
   	     	event.preventDefault();
          console.log("Login Attempted");
          var username = $('#username').val();
          var password = $('#password').val();
          console.log(username);
          testLogin(username, password);
         
      	});
    });


    function storeCredentials(username, password, token){
      localStorage.setItem('username', username);
      localStorage.setItem('password', password);
      localStorage.setItem('token', token);
    }

    function testLogin(username, password ){
      console.log("Login Test started");
      $('#message').html('Attempting login <i class="icon-cog status-indicator"></i>' );
      $('#message').addClass('label-info');

        $.ajax({
          url: baseURL + appApiPath,
          type:"get",
          error: errorHandler,
          success: handleSuccess,
          headers:{
              "Authorization": make_basic_auth(username,password)
          },       
          cache:false,
          crossDomain:true
        });



    }

    function handleSuccess(response, status, jqXHR){
      console.log(response);
      console.log(status);
      var username = $('#username').val();
      var password = $('#password').<PASSWORD>();
      storeCredentials(username,password,response.token);
      window.location.href = "list.html";
    }

    function errorHandler(error){
      $('#message').removeClass('label-info');
      $('#message').addClass('label-warning');
      $('#message').html("Check your username and password." );
      console.log("Login Error");
      console.log(error);
    }


    </script>

</head>    
<body>
	<div class="navbar navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container">
          <a class="brand" href="./index.html">PhoneGap Build Watcher</a>
        </div>
      </div>
    </div>

    <div class="container">
		<form id="login" class="well">
      <p id="message" class="label">Login with your PhoneGap Build Details.</p>
			<label for="username">Username:</label>
			<input type="email" name="username" id="username" class="input-xlarge" />

			<label for="password">Password:</label>
			<input type="password" name="password" id="password" class="input-xlarge" />
			<br />
			<input id="loginsubmit" class="btn btn-primary" type="submit" value="Login!" class="input-xlarge" >
		</form>
	</div>
</body>
</html>
{'fraction_non_alphanumeric': 0.17861205915813425, 'fraction_numerical': 0.0019502681618722574, 'mean_word_length': 2.9499358151476254, 'pattern_counts': {'":': 2, '<': 90, '<?xml version=': 0, '>': 90, 'https://': 2, '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': '4953910', 'n_tokens_mistral': 1839, 'n_tokens_neox': 1776, 'n_words': 343}