Skip to content

Commit

Permalink
deploy: 6ed6812
Browse files Browse the repository at this point in the history
  • Loading branch information
harshdoesdev committed Jan 15, 2024
1 parent a52a542 commit 5bf86e0
Show file tree
Hide file tree
Showing 56 changed files with 160,615 additions and 130,352 deletions.
8 changes: 8 additions & 0 deletions -/fastn-stack.github.io/fastn-js/download.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,11 @@ function download_as_svg(element_id, filename) {
console.error('Error downloading image:', error);
});
}

function download_text(filename, text) {
const blob = new Blob([fastn_utils.getStaticValue(text)], { type: 'text/plain' });
const link = document.createElement('a');
link.href = window.URL.createObjectURL(blob);
link.download = filename;
link.click();
}
Loading

0 comments on commit 5bf86e0

Please sign in to comment.