I’m making a webextension that will have an options page with 1 checkbox. In the browser action that I have developed, it looks for a variable in storage that will be either true or false. By default, when the user first installs the program, I want the variable to be set to true, but I can’t find out how to do that without the user going to the options page manually and checking the box.
Is there a way to put objects into storage automatically after the user installs the addon? My addon won’t work properly unless the default is set to true.
I have tried adding an if statement that checks to see if the user has any objects in the addon storage and that seems to work when the user opens the options page first, but adding the same code to my actual browser action didn’t have the same results.