diff options
author | marudor <marudor@marudor.de> | 2018-02-08 23:01:43 +0100 |
---|---|---|
committer | marudor <marudor@marudor.de> | 2018-02-08 23:01:43 +0100 |
commit | 757d87946931620cf5fe84ec5f163edd6f3986f8 (patch) | |
tree | 224336e2b108c375842c4d10dd22bc927040073a /js/vendor.js | |
parent | 71b41847e6247471abb957b5859605d9f92fb77e (diff) |
changes based on igels review
Diffstat (limited to 'js/vendor.js')
-rw-r--r-- | js/vendor.js | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/js/vendor.js b/js/vendor.js index 5857efb1..7fb51099 100644 --- a/js/vendor.js +++ b/js/vendor.js @@ -10,22 +10,10 @@ import 'imports-loader?this=>window&define=>false&exports=>false!moment/locale/d import './forms'; import './sticky-headers'; import 'icomoon/style.css'; +import './moment-countdown'; $(function () { moment.locale("%locale%"); }); -$(document).ready(function () { - if (typeof moment !== "undefined") { - $.each($(".moment-countdown"), function (i, e) { - var span = $(e); - var text = span.html(); - /* global moment */ - var timestamp = moment(parseInt(span.attr("data-timestamp") * 1000)); - span.html(text.replace("%c", timestamp.fromNow())); - setInterval(function () { - span.html(text.replace("%c", timestamp.fromNow())); - }, 1000); - }); - } -}); + |