From 14fac577dfba968d75037a3792011221c8e01888 Mon Sep 17 00:00:00 2001 From: Martin Zimmermann Date: Tue, 27 May 2014 14:27:35 +0200 Subject: [PATCH] fix syntax --- isso/js/app/count.js | 2 +- isso/js/app/jade.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/isso/js/app/count.js b/isso/js/app/count.js index f29ac4e..7b795fd 100644 --- a/isso/js/app/count.js +++ b/isso/js/app/count.js @@ -9,7 +9,7 @@ define(["app/api", "app/dom", "app/i18n"], function(api, $, i18n) { } var tid = el.getAttribute("data-isso-id") || - el.href.match("^(.+)#isso-thread$")[1] + el.href.match(/^(.+)#isso-thread$/)[1] .replace(/^.*\/\/[^\/]+/, ''); if (tid in objs) { diff --git a/isso/js/app/jade.js b/isso/js/app/jade.js index 78346b6..805338c 100644 --- a/isso/js/app/jade.js +++ b/isso/js/app/jade.js @@ -26,10 +26,11 @@ define(["libjs-jade-runtime", "app/utils", "jade!app/text/postbox", "jade!app/te date = new Date(parseInt(date, 10) * 1000); } - return Array.join([ + return [ date.getUTCFullYear(), utils.pad(date.getUTCMonth(), 2), - utils.pad(date.getUTCDay(), 2)], "-"); + utils.pad(date.getUTCDay(), 2) + ].join("-"); }); return {