aboutsummaryrefslogtreecommitdiffstats
path: root/page.js
diff options
context:
space:
mode:
authorTeddy Wing2014-03-30 19:42:20 -0400
committerTeddy Wing2014-03-30 19:42:20 -0400
commit01fc18879850e420989a72dba24dc70bf621dc29 (patch)
tree33d3c3f74eca81f3f6fb2ad2f761475c316da20b /page.js
parent5e2c8a25efa443fa51ec03149a27197e59cb4eaa (diff)
downloadchrome-copy-urls-from-all-tabs-01fc18879850e420989a72dba24dc70bf621dc29.tar.bz2
Move filename generation code
Move code that generates the filename (without the extension) to a separate function so that we can get it in the header of the main page.
Diffstat (limited to 'page.js')
-rw-r--r--page.js15
1 files changed, 1 insertions, 14 deletions
diff --git a/page.js b/page.js
index 2c9b630..fa2f0b0 100644
--- a/page.js
+++ b/page.js
@@ -1,16 +1,3 @@
(function() {
- var d = new Date();
- var date_string =
- d.getFullYear()
- + ''
- + ('0' + (d.getMonth() + 1)).slice(-2)
- + ''
- + ('0' + d.getDate()).slice(-2)
- + '-'
- + ('0' + d.getHours()).slice(-2)
- + 'h'
- + ('0' + d.getMinutes()).slice(-2);
-
- var header_text = 'chrome-tabs-' + date_string;
- document.getElementById('header').innerHTML = header_text;
+ document.getElementById('header').innerHTML = generate_file_string();
})(); \ No newline at end of file