Skip to content

Commit

Permalink
preserve newlines
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Schinnerl committed Feb 14, 2020
1 parent 093fae4 commit 68188f9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion skybin.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
<script type="text/javascript">
function save() {
var snippet = document.getElementById("snippet").value;
var blob = new Blob(['<html><head><title>Welcome To Skybin</title><head><body><p>'+snippet+'</p></body></html>'], {type: 'text/html'});
snippet = snippet.replace(/\n/g, '<br/>');
var blob = new Blob(['<html><head><title>Welcome To Skybin</title><head><body>'+snippet+'</body></html>'], {type: 'text/html'});
var formData = new FormData();
formData.append('file', blob);
fetch('https://siasky.net/api/skyfile?filename=skybin.html', {
Expand Down

0 comments on commit 68188f9

Please sign in to comment.