mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 01:05:27 +03:00
print remaining time based on app last release date in console
This commit is contained in:
parent
46b3151e37
commit
8f0fe2f9ea
1 changed files with 4 additions and 1 deletions
5
main.js
5
main.js
|
@ -43,7 +43,10 @@ $(document).ready(function () {
|
|||
}
|
||||
|
||||
// check release time to inform people in case they are running old release
|
||||
if (CONFIGURATOR.releaseDate < (new Date().getTime() - (86400000 * 60))) { // 1 day = 86400000 miliseconds, * 60 = 2 month window
|
||||
if (CONFIGURATOR.releaseDate > (new Date().getTime() - (86400000 * 60))) { // 1 day = 86400000 miliseconds, * 60 = 2 month window
|
||||
console.log('Application version is valid for another: ' + Math.round((CONFIGURATOR.releaseDate - (new Date().getTime() - (86400000 * 60))) / 86400000) + ' days');
|
||||
} else {
|
||||
console.log('Application version expired');
|
||||
GUI.log('You\'re using an old version of ' + chrome.runtime.getManifest().name + '. Please update so you can benefit from recently added features and bugfixes.');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue