open usrspace.at homepage on install

This commit is contained in:
Thomas Rupprecht 2023-01-20 16:06:17 +01:00
parent 60c367521e
commit c216676084
1 changed files with 8 additions and 0 deletions

View File

@ -2,6 +2,14 @@ import { REFRESH_TIMEOUT, API_URLS, BADGE_COLORS } from './config.js';
document.querySelector('html').setAttribute('lang', browser.i18n.getUILanguage());
browser.runtime.onInstalled.addListener(async (details) => {
if (details.reason === 'install') {
await browser.tabs.create({
url: 'https://www.usrspace.at/',
});
}
});
/**
* @param {string} url
* @returns {Promise<any>}