diff --git a/webadmin/src/js/index.js b/webadmin/src/js/index.js index f4ad1d7ed..12c2a7f97 100644 --- a/webadmin/src/js/index.js +++ b/webadmin/src/js/index.js @@ -1,6 +1,7 @@ 'use strict'; /* global angular:false */ +/* global showdown:false */ // deal with accessToken in the query, this is passed for example on password reset var search = decodeURIComponent(window.location.search).slice(1).split('&').map(function (item) { return item.split('='); }).reduce(function (o, k) { o[k[0]] = k[1]; return o; }, {}); @@ -162,13 +163,13 @@ app.filter('prettyDate', function () { if (isNaN(day_diff) || day_diff < 0 || day_diff >= 31) return; - return day_diff == 0 && ( + return day_diff === 0 && ( diff < 60 && 'just now' || diff < 120 && '1 minute ago' || diff < 3600 && Math.floor( diff / 60 ) + ' minutes ago' || diff < 7200 && '1 hour ago' || diff < 86400 && Math.floor( diff / 3600 ) + ' hours ago') || - day_diff == 1 && 'Yesterday' || + day_diff === 1 && 'Yesterday' || day_diff < 7 && day_diff + ' days ago' || day_diff < 31 && Math.ceil( day_diff / 7 ) + ' weeks ago'; };