allo- / ffprofile

A tool to create firefox profiles with personalized defaults.
GNU Affero General Public License v3.0
772 stars 56 forks source link

Add support for "storage.js" config files #63

Closed allo- closed 7 years ago

allo- commented 7 years ago

The new addon SDK offers a storage api, which adds json files in ``/browser-extension-data/EXTENSION_ID/storage.js´´. The config api needs an option to specify where to add the option, i.e. for Privacy Badger (see #21)

{
    name: "isFirstRun"
    value: true
    json_file: /browser-extension-data/jid1-MnnxcxisBPnSXQ@jetpack/storage.js
}

possibly adding json_file could be the trigger for not using prefs.js or there could be a type: "prefs/webextension-storage/..." setting.

allo- commented 7 years ago

Use files_inline like this:

{
    'name': 'Privacy Badger',
    ...
    'files_inline': {
        'browser-extension-data/jid1-MnnxcxisBPnSXQ@jetpack/storage.js':
        '{"settings_map":{"isFirstRun": false}}',
    }
}