Synchronize firefox webextension code

This commit is contained in:
2021-03-02 14:56:26 +01:00
parent 0e48a34d71
commit b79000accb
7 changed files with 216 additions and 92 deletions
+8 -1
View File
@@ -17,6 +17,11 @@
along with gPass. If not, see <http://www.gnu.org/licenses/>.
*/
var default_preferences = {"pbkdf2_level": 1000,
"account_url": "https://gpass-demo.soutade.fr/demo",
"always_disabled":false
};
function get_preference(key)
{
return browser.storage.local.get(key)
@@ -38,9 +43,11 @@ function get_preference(key)
);
}
function set_preference(key, value)
function set_preference(key, value, sendResponse)
{
browser.storage.local.set({[key]:value});
if (sendResponse)
sendResponse(true);
}
function delete_preference(key)