From ff175d9af40a718a50090c523b172d22d8e475ae Mon Sep 17 00:00:00 2001 From: tophf Date: Sun, 26 Nov 2017 20:47:23 +0300 Subject: [PATCH] store installDate and updateDate --- background/storage.js | 2 +- background/update.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/background/storage.js b/background/storage.js index 5b1b5163..a7238d0b 100644 --- a/background/storage.js +++ b/background/storage.js @@ -424,7 +424,7 @@ function saveStyle(style) { return style; } codeIsUpdated = !existed || 'sections' in style && !styleSectionsEqual(style, oldStyle); - style = Object.assign({}, oldStyle, style); + style = Object.assign({installDate: Date.now()}, oldStyle, style); return write(style, store); }); } else { diff --git a/background/update.js b/background/update.js index 36adcde7..e9018d55 100644 --- a/background/update.js +++ b/background/update.js @@ -127,6 +127,7 @@ var updater = { function maybeSave(json) { json.id = style.id; + json.updateDate = Date.now(); if (styleSectionsEqual(json, style)) { // JSONs may have different order of items even if sections are effectively equal // so we'll update the digest anyway