File: background.js

package info (click to toggle)
tbsync 4.12-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 2,392 kB
  • sloc: javascript: 4,673; makefile: 20; sh: 20
file content (16 lines) | stat: -rw-r--r-- 716 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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); });