I am in the process of translating my Chrome extension into a Firefox extension. I am having a problem though.
My extension requires stored data for the extension to be loaded in the content script as well as in the popup page. I have no problem with this in my Chrome extension. I just use chrome.storage to pass and retrieve storage and I can use that both in my content and popup scripts with ease.
With Firefox, I'm having a having a hard time figuring out exactly what I have to do different. I got that I can't use chrome.storage and rather use the
const storage = require("sdk/simple-storage").storage;
thing, but I need to use this in both the content script and the script for the popup page. I researched and found I can't use the require function more than once, so my question is, would I be able to share the variable between the popup script and the content script? I need the storage from both sides and there isn't any other way I can see to make the extension work.
Thanks.