From b96967ea9336efd5f194ba24cbd47cd206e1be07 Mon Sep 17 00:00:00 2001 From: coder0107git <76132013+coder0107git@users.noreply.github.com> Date: Fri, 2 Dec 2022 17:59:16 -0700 Subject: [PATCH] Add chrome.storage.sync --- WebExtensionShim.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/WebExtensionShim.js b/WebExtensionShim.js index 34012b1..ab9fd22 100644 --- a/WebExtensionShim.js +++ b/WebExtensionShim.js @@ -80,7 +80,15 @@ chrome = browser = { } callback(results); } - } + }, + sync: { + set: function(...params) { + browser.storage.local.set(...params); + }, + get: function(...params) { + return browser.storage.local.get(...params); + }, + }, }, history: { search: function(query, callback) { @@ -136,4 +144,4 @@ chrome = browser = { create: function(createProperties, callback) { } } -}; \ No newline at end of file +};