diff options
author | Mike Greiling <mike@pixelcog.com> | 2016-11-18 13:23:52 -0600 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2016-11-22 23:33:42 -0600 |
commit | e5a968c4f1485c8890d515bb5bcc958546916fc3 (patch) | |
tree | aa1654ed1e76eeade776a68b7a5a4eacf633e4c5 | |
parent | 536ec509d57705e7e62518dfba82e5727499bc8a (diff) | |
download | gitlab-ce-e5a968c4f1485c8890d515bb5bcc958546916fc3.tar.gz |
move timeago.js to vendor directory
-rw-r--r-- | app/assets/javascripts/application.js | 1 | ||||
-rw-r--r-- | vendor/assets/javascripts/timeago.js (renamed from app/assets/javascripts/lib/utils/timeago.js) | 8 |
2 files changed, 4 insertions, 5 deletions
diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 76f3c6506ed..9333c6e8586 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -19,6 +19,7 @@ /*= require jquery.scrollTo */ /*= require jquery.turbolinks */ /*= require js.cookie */ +/*= require timeago */ /*= require turbolinks */ /*= require autosave */ /*= require bootstrap/affix */ diff --git a/app/assets/javascripts/lib/utils/timeago.js b/vendor/assets/javascripts/timeago.js index edf0a612374..0eb6f7967a5 100644 --- a/app/assets/javascripts/lib/utils/timeago.js +++ b/vendor/assets/javascripts/timeago.js @@ -1,5 +1,3 @@ -/* eslint-disable no-unused-expressions, wrap-iife, func-names, curly, no-param-reassign, no-trailing-spaces, prefer-arrow-callback, no-var, one-var, quote-props, space-before-function-paren, vars-on-top, radix, prefer-template, space-infix-ops, no-use-before-define, newline-per-chained-call, no-useless-escape, no-nested-ternary, indent, no-undef, no-plusplus, one-var-declaration-per-line, operator-assignment, consistent-return, keyword-spacing, max-len, space-unary-ops, no-shadow, no-restricted-syntax, guard-for-in, eol-last, max-len */ - /** * Copyright (c) 2016 hustcc * License: MIT @@ -14,7 +12,7 @@ module.exports = factory(root); else root.timeago = factory(root); -}(typeof window !== 'undefined' ? window : this, +}(typeof window !== 'undefined' ? window : this, function () { var cnt = 0, // the timer counter, for timer key indexMapEn = 'second_minute_hour_day_week_month_year'.split('_'), @@ -32,7 +30,7 @@ function () { SEC_ARRAY = [60, 60, 24, 7, 365/7/12, 12], SEC_ARRAY_LEN = 6, ATTR_DATETIME = 'datetime'; - + // format Date / string / timestamp to Date instance. function toDate(input) { if (input instanceof Date) return input; @@ -236,4 +234,4 @@ function () { }; return timeagoFactory; -});
\ No newline at end of file +}); |