aboutsummaryrefslogtreecommitdiffstats
path: root/chrome-get-urls-from-tabs-in-windows.js
diff options
context:
space:
mode:
Diffstat (limited to 'chrome-get-urls-from-tabs-in-windows.js')
-rw-r--r--chrome-get-urls-from-tabs-in-windows.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome-get-urls-from-tabs-in-windows.js b/chrome-get-urls-from-tabs-in-windows.js
index 0ed0d8f..fc27d1f 100644
--- a/chrome-get-urls-from-tabs-in-windows.js
+++ b/chrome-get-urls-from-tabs-in-windows.js
@@ -94,14 +94,14 @@ generate_backup_text(function(backup_text) {
// Adapted from:
// http://stackoverflow.com/a/18197511
-create_download_link = function(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));
download_link.setAttribute('download', filename);
download_link.innerHTML = 'Download file';
- document.getElementById('download-link').appendChild(download_link);
+ callback(download_link);
});
};