Browse Source

added pre output

master
Kevin Froman 5 years ago
parent
commit
25951b8603
No known key found for this signature in database GPG Key ID: 36698DB39DA54065
  1. 3
      index.html
  2. 4
      main.js
  3. 9
      theme.css
  4. 2
      theme.min.css

3
index.html

@ -29,7 +29,8 @@
</div>
<div class="modal-body">
<br>
<div class='center'><input type='text' readonly id='output'> <button class="btn btn-success" data-clipboard-action="copy" data-clipboard-target="#output">Copy to Clipboard</button></div>
<pre id='output'></pre>
<div class='center'><button class="btn btn-success" data-clipboard-action="copy" data-clipboard-target="#output">Copy to Clipboard</button></div>
<div id='copyFeedback' class='center'></div>
</div>
<div class="modal-footer">

4
main.js

@ -154,7 +154,7 @@ function go(mode) {
}
// convert result to binary
output = textToBin(encodeURIComponent(input));
$('#output').val(replaceAll(replaceAll(output.toString(), "1", one), "0", zero));
$('#output').text(replaceAll(replaceAll(output.toString(), "1", one), "0", zero));
}
else
{
@ -175,7 +175,7 @@ function go(mode) {
return false;
}
}
$('#output').val(output.toString());
$('#output').text(output.toString());
}
$('#outputModal').modal();
}

9
theme.css

@ -39,7 +39,14 @@ footer
#copyFeedback
{
display: none;
margin-top: 1em;
margin-bottom: 1em;
}
#outputDecode, #copyFeedback{
display: none;
}
#outputDecode{
overflow: scroll;
}

2
theme.min.css

@ -1 +1 @@
#copyFeedback,#one{margin-bottom:1em}body{background-color:#d8d8d8;color:#000}.center{text-align:center}#dataArea{margin-left:3em;margin-right:3em}#text{width:100%;max-width:100%;min-height:300px}.dataItem{margin:1em}footer{margin-top:1em;margin-bottom:2em}#copyFeedback{display:none;margin-top:1em}
body{background-color:#d8d8d8;color:black}.center{text-align:center}#dataArea{margin-left:3em;margin-right:3em}#text{width:100%;max-width:100%;min-height:300px}#one{margin-bottom:1em}.dataItem{margin:1em}footer{margin-top:1em;margin-bottom:2em}#copyFeedback{margin-top:1em;margin-bottom:1em}#outputDecode,#copyFeedback{display:none}#outputDecode{overflow:scroll}

Loading…
Cancel
Save