Set installType for on new installs
Fixes Dropbox thinking the browser is in dev mode
This commit is contained in:
parent
aca0572f4d
commit
9fe721945d
|
@ -143,6 +143,10 @@ navigatorUtil.onUrlChange(({tabId, frameId, transitionQualifiers}, type) => {
|
||||||
|
|
||||||
// *************************************************************************
|
// *************************************************************************
|
||||||
chrome.runtime.onInstalled.addListener(({reason}) => {
|
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;
|
if (reason !== 'update') return;
|
||||||
// translations may change
|
// translations may change
|
||||||
localStorage.L10N = JSON.stringify({
|
localStorage.L10N = JSON.stringify({
|
||||||
|
@ -150,9 +154,6 @@ chrome.runtime.onInstalled.addListener(({reason}) => {
|
||||||
});
|
});
|
||||||
// themes may change
|
// themes may change
|
||||||
delete localStorage.codeMirrorThemes;
|
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);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// *************************************************************************
|
// *************************************************************************
|
||||||
|
|
Loading…
Reference in New Issue
Block a user