Browse Source

Make showTutorial() async so await can be used.

1.1.101
Jorg Knobloch 1 year ago
parent
commit
bcd5f85b25
1 changed files with 2 additions and 5 deletions
  1. +2
    -5
      addon/background.js

+ 2
- 5
addon/background.js View File

@ -12,10 +12,7 @@ init();
browser.runtime.onStartup.addListener(() => browser.windows.onCreated.addListener(showTutorial));
function showTutorial() {
async function showTutorial() {
browser.windows.onCreated.removeListener(showTutorial);
browser.pEp4Tb.shouldShowTutorial().then((doit) => {
if (doit) browser.tabs.create({ url: "content/tutorial/tutorial.html" });
});
if (await browser.pEp4Tb.shouldShowTutorial()) browser.tabs.create({ url: "content/tutorial/tutorial.html" });
}

Loading…
Cancel
Save