tbkeys icon indicating copy to clipboard operation
tbkeys copied to clipboard

Migrate settings

Open soporteib opened this issue 1 year ago • 3 comments

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.

soporteib avatar Jan 08 '24 14:01 soporteib

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.

wshanks avatar Jan 08 '24 16:01 wshanks

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

morat523035 avatar Jan 09 '24 04:01 morat523035

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

soporteib avatar Jan 10 '24 15:01 soporteib