From 850b7dc63510121556bb51f5347b2871a79e5133 Mon Sep 17 00:00:00 2001 From: tophf Date: Sat, 3 Mar 2018 23:45:14 +0300 Subject: [PATCH] clear localStorage for CM themes on extension update --- background/background.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/background/background.js b/background/background.js index ba4f0db0..5b459a20 100644 --- a/background/background.js +++ b/background/background.js @@ -98,11 +98,13 @@ prefs.subscribe(['iconset'], () => { const onInstall = ({reason}) => { chrome.runtime.onInstalled.removeListener(onInstall); - // reset L10N cache on update if (reason === 'update') { + // translations may change localStorage.L10N = JSON.stringify({ browserUIlanguage: chrome.i18n.getUILanguage(), }); + // themes may change + delete localStorage.codeMirrorThemes; } }; // bind for 60 seconds max and auto-unbind if it's a normal run