session-desktop/js/expire.js
lilia e7e030a5e2
Build expiration date
Add the buildExpiration config and add it to the renderer's config
object. Use grunt to write the build expiration to
config/local-production.json which will override the default value (no
expiration) in production. Finally, run this grunt task as part of the
build process.

// FREEBIE
2017-09-14 16:53:38 -07:00

16 lines
453 B
JavaScript

;(function() {
'use strict';
var BUILD_EXPIRATION = 0;
try {
BUILD_EXPIRATION = parseInt(window.config.buildExpiration);
if (BUILD_EXPIRATION) {
console.log("Build expires: ", new Date(BUILD_EXPIRATION).toISOString());
}
} catch (e) {}
window.extension = window.extension || {};
extension.expired = function() {
return (BUILD_EXPIRATION && Date.now() > BUILD_EXPIRATION);
};
})();