<commit_before><html>
<head>
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" />
  <script type="text/javascript" src="js/base43.js" ></script>
  <script type="text/javascript">
    function main(){
      var input = document.getElementById("input");
      try {
        var val43 = Base43.decode(input.value.trim());
        document.getElementById("output").innerHTML = val43;
        document.getElementById("error").style.display = "none";
      } catch (e) {
        document.getElementById("error").style.display = "block";
        if (e.message) {
          document.getElementById("error_text").innerHTML = e.message;  
        }
      }
      
      return false;
    }
  </script>

  <!-- My inadequate attempts at CSS -->
  <style>

    body {
      padding: 30px;
      font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
    }
    textarea#input {
      width: 600px;
      height: 120px;
      border: 3px solid #cccccc;
      padding: 5px;
      font-family: Tahoma, sans-serif;
      display: block;
    }
    pre.prettyprint {
      font-family: Menlo,Monaco,Consolas,"Courier New",monospace;
      display: block;
      padding: 8.5px;
      margin: 0 0 9px;
      font-size: 12.025px;
      line-height: 18px;
      word-break: break-all;
      word-wrap: break-word;
      white-space: pre;
      white-space: pre-wrap;
      background-color: #f5f5f5;
      border: 1px solid #ccc;
      border: 1px solid rgba(0,0,0,0.15);
      -webkit-border-radius: 4px;
      -moz-border-radius: 4px;
      border-radius: 4px;
      max-width: 800px;
    }
    form button {
      float: right;
      margin: 10px;
      display: inline-block;
      padding: 4px 10px 4px;
      margin-bottom: 0;
      font-size: 13px;
      line-height: 18px;
      color: #333;
      text-align: center;
      text-shadow: 0 1px 1px rgba(255,255,255,0.75);
      vertical-align: middle;
      cursor: pointer;
      background-color: #f5f5f5;
      background-image: -ms-linear-gradient(top,#fff,#e6e6e6);
      background-image: -webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));
      background-image: -webkit-linear-gradient(top,#fff,#e6e6e6);
      background-image: -o-linear-gradient(top,#fff,#e6e6e6);
      background-image: linear-gradient(top,#fff,#e6e6e6);
      background-image: -moz-linear-gradient(top,#fff,#e6e6e6);
      background-repeat: repeat-x;
      border: 1px solid #ccc;
      border-color: rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);
      border-color: #e6e6e6 #e6e6e6 #bfbfbf;
      border-bottom-color: #b3b3b3;
      -webkit-border-radius: 4px;
      -moz-border-radius: 4px;
      border-radius: 4px;
      filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ffffff',endColorstr='#e6e6e6',GradientType=0);
      filter: progid:dximagetransform.microsoft.gradient(enabled=false);
      -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);
      -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);
      font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
      cursor: pointer;
      webkit-appearance: button;
    }
    #heading {
      max-width: 800px;
    }

    form {
      display: inline-block;
      margin: 20px;
    }
    
    #error {
      display: none;
      margin: 10px 0px;
      padding:12px;
      color: #D8000C;
      background-color: #FFBABA;
      max-width: 800px;
    }

    #error i {
      margin:10px 22px;
      vertical-align:middle;
    }

    #error_text {
      display: inline-block;
    }

  </style>
</head>
<body>
<!-- This is where I try to write raw html and make a total mess of it. Here goes! -->

<div id="heading">
  <h1>Electrum base43 converter</h1>
  <p>The Electrum bitcoin wallet converts data into a custom base43 format before turning it into a QR code. This data has to be converted to a hex string before the transaction can be understood by Bitcoin and sent to the Bitcoin network (perhaps using a tool like <a href="https://blockchain.info/decode-tx">this one</a> or <a href="https://blockchain.info/pushtx">this one</a>). This tool will do that for you.
  </p>
</div>
<form onsubmit="return main()">
  <textarea type="textarea" name="theTextArea" id="input"></textarea>
  <button>convert!</button>
</form>
<pre class="prettyprint" id="output">this is where the output will go</pre>
<div id="error"><i class="fa fa-times-circle"></i>
  <div id="error_text">There is an error. </div>
</div>

</body>
</html><commit_msg>editing copy<commit_after><html>
<head>
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" />
  <script type="text/javascript" src="js/base43.js" ></script>
  <script type="text/javascript">
    function main(){
      var input = document.getElementById("input");
      try {
        var val43 = Base43.decode(input.value.trim());
        document.getElementById("output").innerHTML = val43;
        document.getElementById("error").style.display = "none";
      } catch (e) {
        document.getElementById("error").style.display = "block";
        if (e.message) {
          document.getElementById("error_text").innerHTML = e.message;  
        }
      }
      
      return false;
    }
  </script>

  <!-- My inadequate attempts at CSS -->
  <style>

    body {
      padding: 30px;
      font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
    }
    textarea#input {
      width: 600px;
      height: 120px;
      border: 3px solid #cccccc;
      padding: 5px;
      font-family: Tahoma, sans-serif;
      display: block;
    }
    pre.prettyprint {
      font-family: Menlo,Monaco,Consolas,"Courier New",monospace;
      display: block;
      padding: 8.5px;
      margin: 0 0 9px;
      font-size: 12.025px;
      line-height: 18px;
      word-break: break-all;
      word-wrap: break-word;
      white-space: pre;
      white-space: pre-wrap;
      background-color: #f5f5f5;
      border: 1px solid #ccc;
      border: 1px solid rgba(0,0,0,0.15);
      -webkit-border-radius: 4px;
      -moz-border-radius: 4px;
      border-radius: 4px;
      max-width: 800px;
    }
    form button {
      float: right;
      margin: 10px;
      display: inline-block;
      padding: 4px 10px 4px;
      margin-bottom: 0;
      font-size: 13px;
      line-height: 18px;
      color: #333;
      text-align: center;
      text-shadow: 0 1px 1px rgba(255,255,255,0.75);
      vertical-align: middle;
      cursor: pointer;
      background-color: #f5f5f5;
      background-image: -ms-linear-gradient(top,#fff,#e6e6e6);
      background-image: -webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));
      background-image: -webkit-linear-gradient(top,#fff,#e6e6e6);
      background-image: -o-linear-gradient(top,#fff,#e6e6e6);
      background-image: linear-gradient(top,#fff,#e6e6e6);
      background-image: -moz-linear-gradient(top,#fff,#e6e6e6);
      background-repeat: repeat-x;
      border: 1px solid #ccc;
      border-color: rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);
      border-color: #e6e6e6 #e6e6e6 #bfbfbf;
      border-bottom-color: #b3b3b3;
      -webkit-border-radius: 4px;
      -moz-border-radius: 4px;
      border-radius: 4px;
      filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ffffff',endColorstr='#e6e6e6',GradientType=0);
      filter: progid:dximagetransform.microsoft.gradient(enabled=false);
      -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);
      -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);
      font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
      cursor: pointer;
      webkit-appearance: button;
    }
    #heading {
      max-width: 800px;
    }

    form {
      display: inline-block;
      margin: 20px;
    }
    
    #error {
      display: none;
      margin: 10px 0px;
      padding:12px;
      color: #D8000C;
      background-color: #FFBABA;
      max-width: 800px;
    }

    #error i {
      margin:10px 22px;
      vertical-align:middle;
    }

    #error_text {
      display: inline-block;
    }

  </style>
</head>
<body>
<!-- This is where I try to write raw html and make a total mess of it. Here goes! -->

<div id="heading">
  <h1>Electrum base43 converter</h1>
  <p>This tool converts Electrum's base 43 data format into the hex string format understood by Bitcoin. You might use this to convert an Electrum QR code of an offline signed transaction into a hex string before broadcasting it to the Bitcoin network with a tool like <a href="https://blockchain.info/pushtx">this one</a>.
  </p>
</div>
<form onsubmit="return main()">
  <textarea type="textarea" name="theTextArea" id="input"></textarea>
  <button>convert!</button>
</form>
<pre class="prettyprint" id="output">this is where the output will go</pre>
<div id="error"><i class="fa fa-times-circle"></i>
  <div id="error_text">There is an error. </div>
</div>

</body>
</html>
{'fraction_non_alphanumeric': 0.14809176905512667, 'fraction_numerical': 0.0511036207458954, 'mean_word_length': 2.796120511762278, 'pattern_counts': {'":': 0, '<': 79, '<?xml version=': 0, '>': 79, 'https://': 5, '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': '2422100', 'n_tokens_mistral': 3625, 'n_tokens_neox': 3205, 'n_words': 710}