add only blocks path

pull/1769/head
Ayrat Badykov 6 years ago
parent f2c15afa3a
commit 80ef7967a6
No known key found for this signature in database
GPG Key ID: B44668E265E9396F
  1. 2
      apps/block_scout_web/assets/js/lib/from_now.js

@ -22,7 +22,7 @@ function updateAge (el, timestamp) {
let fromNow = timestamp.fromNow() let fromNow = timestamp.fromNow()
// show the exact time only for transaction details page. Otherwise, short entry // show the exact time only for transaction details page. Otherwise, short entry
const elInTile = el.hasAttribute('in-tile') const elInTile = el.hasAttribute('in-tile')
if (!elInTile) { if ((window.location.pathname.includes('/tx/') || window.location.pathname.includes('/blocks/')) && !elInTile) {
const offset = moment().utcOffset() / 60 const offset = moment().utcOffset() / 60
const sign = offset && Math.sign(offset) ? '+' : '-' const sign = offset && Math.sign(offset) ? '+' : '-'
const formatDate = `MMMM-DD-YYYY hh:mm:ss A ${sign}${offset} UTC` const formatDate = `MMMM-DD-YYYY hh:mm:ss A ${sign}${offset} UTC`

Loading…
Cancel
Save