I want to store some data in the addon SDK.
var ss = require("sdk/simple-storage");
ss.storage.myArray = [1,2,1,3,4,5];
ss.storage.myString="Hi";
I use JPM. To run the code, I navigate to the profile where the extension is stored in. In Windows:
C:\Users\myuser\AppData\Roaming\Mozilla\Firefox\Profiles\[myprofile]\extensions\storage
Then, I run this command: jpm run --no-copy --profile C:\Users\myuser\AppData\Roaming\Mozilla\Firefox\Profiles\[myprofile]
But what I get as a result is an empty new browser window with lots of lines as the this:
1494868910707 DeferredSave.extensions.json DEBUG Save changes
1494868910708 DeferredSave.extensions.json DEBUG Save changes
1494868910710 addons.manager DEBUG Registering startup change 'changed' for @storage
1494868910718 addons.xpi DEBUG Loading bootstrap scope from C:\Users\myuser\AppData\Roaming\Mozilla\Firefox\Profiles\[myprofile]\extensions\@storage.xpi
1494868910769 addons.xpi DEBUG Calling bootstrap method install on @storage version 0.0.1
1494868910769 addons.xpi-utils DEBUG Make addon app-profile:@storage visible
1494868910770 DeferredSave.extensions.json DEBUG Save changes
1494868910770 addons.xpi-utils DEBUG Make addon app-system-defaults:aushelper@mozilla.org visible
1494868910771 DeferredSave.extensions.json DEBUG Save changes
Can you clarify how can I use simpl-storage to store some data permanently in the Addon?