debian-mirror-gitlab/app/assets/javascripts/pages/projects/jobs/index/index.js
2018-12-13 13:39:08 +05:30

16 lines
411 B
JavaScript

import Vue from 'vue';
import GlCountdown from '~/vue_shared/components/gl_countdown.vue';
document.addEventListener('DOMContentLoaded', () => {
const remainingTimeElements = document.querySelectorAll('.js-remaining-time');
remainingTimeElements.forEach(
el =>
new Vue({
...GlCountdown,
el,
propsData: {
endDateString: el.dateTime,
},
}),
);
});