aboutsummaryrefslogtreecommitdiffstats
path: root/chrome-get-urls-from-tabs-in-windows.js
diff options
context:
space:
mode:
authorTeddy Wing2014-03-30 12:51:07 -0400
committerTeddy Wing2014-03-30 12:51:07 -0400
commit8a6cae6d16075a2198177d1c678de17d7eed6f45 (patch)
tree839573021bd967abd62c657b36ef13bdacb79ebb /chrome-get-urls-from-tabs-in-windows.js
parentb616a09961447ef569f8674e830c050d2ca160a8 (diff)
downloadchrome-copy-urls-from-all-tabs-8a6cae6d16075a2198177d1c678de17d7eed6f45.tar.bz2
Add comment: where the file download code came from
Diffstat (limited to 'chrome-get-urls-from-tabs-in-windows.js')
-rw-r--r--chrome-get-urls-from-tabs-in-windows.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/chrome-get-urls-from-tabs-in-windows.js b/chrome-get-urls-from-tabs-in-windows.js
index 6f957cd..a689b0c 100644
--- a/chrome-get-urls-from-tabs-in-windows.js
+++ b/chrome-get-urls-from-tabs-in-windows.js
@@ -25,6 +25,8 @@ chrome.windows.getAll({populate:true},function(windows){
});
+// Adapted from:
+// http://stackoverflow.com/a/18197511
create_download_link = function(text) {
var download_link = document.createElement('a');
download_link.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));