summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorAaron Parecki <aaron@parecki.com>2016-02-10 18:48:57 -0800
committerAaron Parecki <aaron@parecki.com>2016-02-10 18:48:57 -0800
commitbcfb8731ca342bf3d5b8da0024c273c7adb7c1cb (patch)
tree91c2657bdfab2121dac5874bafc5175ac13511f9 /public
parent76aa9c2bc9d31549e44bc0b10817eb6e252dbe11 (diff)
fix sending category as array
Diffstat (limited to 'public')
-rw-r--r--public/js/script.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/public/js/script.js b/public/js/script.js
index 399af05..ea86931 100644
--- a/public/js/script.js
+++ b/public/js/script.js
@@ -5,6 +5,7 @@
var minutes = zero_pad(Math.floor(seconds / 60) % 60);
return (seconds < 0 ? '-' : '+') + hours + ":" + minutes;
}
+
function zero_pad(num) {
num = "" + num;
if(num.length == 1) {
@@ -13,6 +14,10 @@
return num;
}
+ function csv_to_array(val) {
+ return val.split(/[, ]+/);
+ }
+
$(function(){