Sha256: 1063cb84cadba6bc70bd3c3ae0e734745eb1efcd5e8c2aca8ed2d3aca0e94587
Contents?: true
Size: 593 Bytes
Versions: 9
Compression:
Stored size: 593 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
9 entries across 9 versions & 1 rubygems