From c744eb0ef712cb8391b5092c988a200fd1c0a192 Mon Sep 17 00:00:00 2001 From: jahoti Date: Wed, 23 Jun 2021 01:38:07 +0000 Subject: Fix storage initialization on Icecat 60 This patch fixes storage initialization on Gecko browsers by switching from using a background page to using a list of scripts. It remains a mystery why that should have any effect; the only hint is that browser.runtime.onInstalled does not fire when called from a script loaded in a background page. Signed-off-by: jahoti --- TODOS.org | 2 +- background/background.html | 43 ------------------------------------------- manifest.json | 19 ++++++++++++++++++- 3 files changed, 19 insertions(+), 45 deletions(-) delete mode 100644 background/background.html diff --git a/TODOS.org b/TODOS.org index 026bf79..0885342 100644 --- a/TODOS.org +++ b/TODOS.org @@ -46,10 +46,10 @@ TODO: fetch those scripts - make extension's all html files proper XHTML - split options_main.js into several smaller files -- find out what causes storage sometimes not to get initialized under IceCat 60 - validate settings data on import DONE: +- find out what causes storage sometimes not to get initialized under IceCat 60 -- DONE? 2021-06-23 - make it possible to export page settings in some format -- DONE 2021-06-19 - make it possible to use wildcard urls in settings -- DONE 2021-05-14 - port to gecko-based browsers -- DONE 2021-05-13 diff --git a/background/background.html b/background/background.html deleted file mode 100644 index 53a74e9..0000000 --- a/background/background.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/manifest.json b/manifest.json index d3a5980..f7369c6 100644 --- a/manifest.json +++ b/manifest.json @@ -73,7 +73,24 @@ "web_accessible_resources": [ ], "background": { - "page": "background/background.html" + "persistent": true, + "scripts": [ + "common/stored_types.js", + "common/lock.js", + "common/once.js", + "common/browser.js", + "background/storage.js", + "background/message_server.js", + "common/connection_types.js", + "background/storage_server.js", + "common/url_item.js", + "common/sha256.js", + "background/settings_query.js", + "background/page_actions_server.js", + "common/gen_unique.js", + "background/policy_injector.js", + "background/main.js" + ] }, "content_scripts": [ { -- cgit v1.2.3