Sha256: d949892dc2d7c5cb340941fa4e89714574c34ae18c069342c8611411bcb17a13
Contents?: true
Size: 572 Bytes
Versions: 13
Compression:
Stored size: 572 Bytes
Contents
import Component from "@ember/component"; import { formatTime } from "client-app/lib/utilities"; export default Component.extend({ didInsertElement() { const updateTimes = () => { Em.$(".auto-update-time").each(function() { const timestamp = parseInt(this.getAttribute("data-timestamp"), 10); const elem = this; const text = formatTime(timestamp); if (text !== elem.innerText) { elem.innerText = text; } }); Em.run.later(updateTimes, 60000); }; Em.run.later(updateTimes, 60000); } });
Version data entries
13 entries across 13 versions & 1 rubygems