Update main.js

This commit is contained in:
Arinerron 2017-03-27 21:04:07 -07:00 committed by GitHub
parent ef0bbd6cd7
commit d3c5b25c06

View File

@ -125,7 +125,7 @@ $('#go').click(function(){
} }
} }
// convert result to binary // convert result to binary
output = textToBin(input); output = textToBin(btoa(input));
$('#output').val(output.toString().replace(/1/g, " ").replace(/0/g, "\t")); $('#output').val(output.toString().replace(/1/g, " ").replace(/0/g, "\t"));
} }
else else
@ -142,7 +142,7 @@ $('#go').click(function(){
return false; return false;
} }
} }
$('#output').val(output.toString()); $('#output').val(atob(output.toString()));
} }
$('#outputModal').modal(); $('#outputModal').modal();
}); });