summaryrefslogtreecommitdiffstats
path: root/background.js
diff options
context:
space:
mode:
Diffstat (limited to 'background.js')
-rw-r--r--background.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/background.js b/background.js
new file mode 100644
index 0000000..7987517
--- /dev/null
+++ b/background.js
@@ -0,0 +1,16 @@
+function handleUpdateAvailable(details) {
+ console.log("Update available for TbSync");
+}
+
+async function main() {
+ // just by registering this listener, updates will not install until next restart
+ //messenger.runtime.onUpdateAvailable.addListener(handleUpdateAvailable);
+
+ await messenger.BootstrapLoader.registerChromeUrl([ ["content", "tbsync", "content/"] ]);
+ await messenger.BootstrapLoader.registerOptionsPage("chrome://tbsync/content/manager/addonoptions.xhtml");
+ await messenger.BootstrapLoader.registerBootstrapScript("chrome://tbsync/content/scripts/bootstrap.js");
+}
+
+main();
+
+messenger.browserAction.onClicked.addListener(tab => { messenger.BootstrapLoader.openOptionsDialog(tab.windowId); });