diff options
author | Christian Segundo | 2023-11-19 16:21:29 +0100 |
---|---|---|
committer | Christian Segundo | 2023-11-19 16:21:29 +0100 |
commit | c6845a798c99e96aa0e2f6daece0684a8ac50681 (patch) | |
tree | a75eec68984bcb7ff8f8c5f048b4806d5cb4ff5a /storage.js | |
parent | d880836621f0b4b4ca036e62e34d6edc74b61e81 (diff) | |
download | moz-run-this-page-action-c6845a798c99e96aa0e2f6daece0684a8ac50681.tar.gz |
wip
Diffstat (limited to 'storage.js')
-rw-r--r-- | storage.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/storage.js b/storage.js new file mode 100644 index 0000000..d8964bf --- /dev/null +++ b/storage.js @@ -0,0 +1,12 @@ +async function StorageGetDomains() { + const data = await browser.storage.sync.get('domains'); + if (data.domains.length === 0) { + StorageUpdateDomainList(["https://gitlab.com"]); + return StorageGetDomains(); + } + return data.domains; +}; + +async function StorageUpdateDomainList(domains) { + return browser.storage.sync.set({ 'domains': domains }); +} |