diff options
Diffstat (limited to 'src/background/repositories')
-rw-r--r-- | src/background/repositories/tab.js | 5 | ||||
-rw-r--r-- | src/background/repositories/version.js | 10 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/background/repositories/tab.js b/src/background/repositories/tab.js new file mode 100644 index 0000000..16989e1 --- /dev/null +++ b/src/background/repositories/tab.js @@ -0,0 +1,5 @@ +export default class TabRepository { + create(url) { + browser.tabs.create({ url, }); + } +} diff --git a/src/background/repositories/version.js b/src/background/repositories/version.js new file mode 100644 index 0000000..4c71d05 --- /dev/null +++ b/src/background/repositories/version.js @@ -0,0 +1,10 @@ +export default class VersionRepository { + async get() { + let { version } = await browser.storage.local.get('version'); + return version; + } + + update(version) { + return browser.storage.local.set({ version }); + } +} |