signal-desktop/js/expire.js

23 lines
487 B
JavaScript
Raw Normal View History

// eslint-disable-next-line func-names
2018-04-27 21:25:04 +00:00
(function() {
'use strict';
let BUILD_EXPIRATION = 0;
2018-04-27 21:25:04 +00:00
try {
BUILD_EXPIRATION = parseInt(window.getExpiration(), 10);
2018-04-27 21:25:04 +00:00
if (BUILD_EXPIRATION) {
window.log.info(
'Build expires: ',
new Date(BUILD_EXPIRATION).toISOString()
);
2018-04-27 21:25:04 +00:00
}
} catch (e) {
// nothing
}
2018-04-27 21:25:04 +00:00
window.extension = window.extension || {};
window.extension.expired = () =>
BUILD_EXPIRATION && Date.now() > BUILD_EXPIRATION;
})();