diff options
author | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2018-08-07 12:57:32 +0800 |
---|---|---|
committer | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2018-08-14 05:08:13 +0800 |
commit | b83a746e4fce9c57c81128cfe35b28e9386a557f (patch) | |
tree | 0337ec44dd19284db8e63f975cdcb45d28b17370 /ui | |
parent | 247fa2cc510e72bc5cc57596c61c42d77ca77b8e (diff) | |
download | tangerine-wallet-browser-b83a746e4fce9c57c81128cfe35b28e9386a557f.tar tangerine-wallet-browser-b83a746e4fce9c57c81128cfe35b28e9386a557f.tar.gz tangerine-wallet-browser-b83a746e4fce9c57c81128cfe35b28e9386a557f.tar.bz2 tangerine-wallet-browser-b83a746e4fce9c57c81128cfe35b28e9386a557f.tar.lz tangerine-wallet-browser-b83a746e4fce9c57c81128cfe35b28e9386a557f.tar.xz tangerine-wallet-browser-b83a746e4fce9c57c81128cfe35b28e9386a557f.tar.zst tangerine-wallet-browser-b83a746e4fce9c57c81128cfe35b28e9386a557f.zip |
Add exportAsFile optional type argument
Diffstat (limited to 'ui')
-rw-r--r-- | ui/app/util.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/app/util.js b/ui/app/util.js index 8b194e0c7..ade4fec8a 100644 --- a/ui/app/util.js +++ b/ui/app/util.js @@ -271,9 +271,9 @@ function getContractAtAddress (tokenAddress) { return global.eth.contract(abi).at(tokenAddress) } -function exportAsFile (filename, data) { +function exportAsFile (filename, data, type = 'text/csv') { // source: https://stackoverflow.com/a/33542499 by Ludovic Feltz - const blob = new Blob([data], {type: 'text/csv'}) + const blob = new Blob([data], {type}) if (window.navigator.msSaveOrOpenBlob) { window.navigator.msSaveBlob(blob, filename) } else { |