From 9fe721945d0770b020cf09ef5cf6bb6197dc87eb Mon Sep 17 00:00:00 2001 From: Rob Garrison Date: Thu, 29 Nov 2018 22:04:43 -0600 Subject: [PATCH] Set installType for on new installs Fixes Dropbox thinking the browser is in dev mode --- background/background.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/background/background.js b/background/background.js index ac2927e7..c01c063b 100644 --- a/background/background.js +++ b/background/background.js @@ -143,6 +143,10 @@ navigatorUtil.onUrlChange(({tabId, frameId, transitionQualifiers}, type) => { // ************************************************************************* chrome.runtime.onInstalled.addListener(({reason}) => { + // save install type: "admin", "development", "normal", "sideload" or "other" + // "normal" = addon installed from webstore + chrome.management.getSelf(info => localStorage.installType = info.installType); + if (reason !== 'update') return; // translations may change localStorage.L10N = JSON.stringify({ @@ -150,9 +154,6 @@ chrome.runtime.onInstalled.addListener(({reason}) => { }); // themes may change delete localStorage.codeMirrorThemes; - // save install type: "admin", "development", "normal", "sideload" or "other" - // "normal" = addon installed from webstore - chrome.management.getSelf(info => localStorage.installType = info.installType); }); // *************************************************************************