aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2014-06-22 16:12:18 -0400
committerTeddy Wing2014-06-22 16:12:18 -0400
commit7c3db96ae626c25900be704dfe2a3696b71816fe (patch)
treee408e9945a1f2e8c261fc030e4f5c2a2391994fa
parentb33c500129d53663a37873c5db5f4f1d6a5ba908 (diff)
parent47eaea3fbb49b03c09e74ab152a8d52d3fcc7fad (diff)
downloadchrome-copy-urls-from-all-tabs-7c3db96ae626c25900be704dfe2a3696b71816fe.tar.bz2
Merge branch 'filename-incorrect-on-chrome-35'
-rw-r--r--TODO5
-rw-r--r--chrome-get-urls-from-tabs-in-windows.js3
2 files changed, 7 insertions, 1 deletions
diff --git a/TODO b/TODO
index 0c3340c..b183258 100644
--- a/TODO
+++ b/TODO
@@ -1,6 +1,11 @@
TODO
====
+2014.06.12:
+v Fix Chrome download link bug (filename appears as `download.txt`). See:
+ https://code.google.com/p/chromium/issues/detail?id=375634
+ http://stackoverflow.com/questions/2897619/using-html5-javascript-to-generate-and-save-a-file/18197511#comment36775212_18197511
+
2014.03.30:
v Better fonts
v Move download link
diff --git a/chrome-get-urls-from-tabs-in-windows.js b/chrome-get-urls-from-tabs-in-windows.js
index c46fbf5..90682f2 100644
--- a/chrome-get-urls-from-tabs-in-windows.js
+++ b/chrome-get-urls-from-tabs-in-windows.js
@@ -98,7 +98,8 @@ generate_backup_text(function(backup_text) {
create_download_link = function(text, callback) {
generate_filename(function(filename) {
var download_link = document.createElement('a');
- download_link.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));
+ var blob = new Blob([text], { type: 'text/plain' });
+ download_link.setAttribute('href', window.URL.createObjectURL(blob));
download_link.setAttribute('download', filename);
download_link.innerHTML = 'Download file';