wshanks / tbkeys

Custom keybindings for Thunderbird
Other
199 stars 14 forks source link

Migrate settings #164

Open soporteib opened 9 months ago

soporteib commented 9 months ago

Hello, I want to apply the settings of this plugin to multiple users and profiles. In which file are the settings applied? I've looked at prefs.js and userChrome without success. Thanks you, best regards.

wshanks commented 9 months ago

The plugin uses browser.storage.local.set to save the settings here:

https://github.com/wshanks/tbkeys/blob/568a5d494aa8ab8c989c343e59b11ec7280cd2ff/addon/options.js#L28

I think this writes the settings into a sqlite database in the profile directory, but I have not investigated how it is stored exactly.

morat523035 commented 9 months ago

Here is how to show the storage contents in a Console tab.

Menu Bar > Tools > Developer Tools > Debug Addons > tbkeys > Inspect

browser.storage.local.get(null).then(function (aResult) {
  console.log(aResult);
});

WebExtensions browser.storage.local http://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/API/storage/local

Here is the path of the sqlite database.

<Profile Folder>\storage\default\moz-extension+++<Internal UUID>^userContextId=4294967295\idb\3647222921wleabcEoxlt-eengsairo.sqlite

The internal UUID is a different value for each installation of the addon.

The storage contents are encoded using a special Mozilla format in the sqlite database.

More info http://stackoverflow.com/questions/54920939

soporteib commented 9 months ago

Hello, Is there a way to clone settings between users and PCs?