Caret/installer.js
Thomas Wilburn e567869075 Clear out the syncFileSystem stuff for now.
This API does not seem ready for prime time yet, we'll have to hold off
on the transition.
2013-12-03 18:52:10 -08:00

21 lines
No EOL
744 B
JavaScript

chrome.runtime.onInstalled.addListener(function(e) {
//this is where we'll track upgrades
if (!e.previousVersion) return;
var semver = e.previousVersion.split(".");
var major = semver[0];
var minor = semver[1];
var build = semver[2];
console.log("Upgrading Caret from version " + e.previousVersion);
/*
As with Android database upgrades, we'll perform these as a series of if statements, ordered by increasing
version number. We should also provide a notification that the system is upgrading, and prevent opening new
windows until the process finishes. In theory, this script shares a document with background.js, so they can
just use a common flag to halt the openWindow process during upgrades.
*/
});