refactor(config): move homepage url to config

This commit is contained in:
Thomas Rupprecht 2023-06-01 00:02:31 +02:00
parent 8aa6db1275
commit f3d8199b97
3 changed files with 8 additions and 2 deletions

View File

@ -13,6 +13,10 @@ All notable changes to this project will be documented in this file.
- Correctly update the changelog on release
### 🚜 Refactor
- Improve browser-polyfill inject
### 📚 Documentation
- Add logo and screenshot to readme

View File

@ -1,10 +1,10 @@
import { REFRESH_TIMEOUT, API_URLS, BADGE_COLORS } from './config.js';
import { REFRESH_TIMEOUT, HOMEPAGE, API_URLS, BADGE_COLORS } from './config.js';
// [INJECT-BROWSER-POLYFILL]
browser.runtime.onInstalled.addListener(async (details) => {
if (details.reason === 'install') {
await browser.tabs.create({
url: 'https://www.usrspace.at/',
url: HOMEPAGE,
});
}
});

View File

@ -1,5 +1,7 @@
export const REFRESH_TIMEOUT = 5;
export const HOMEPAGE = 'https://www.usrspace.at/';
export const API_URLS = {
spaceApi: 'https://www.usrspace.at/spaceapi.json',
calender: 'https://www.usrspace.at/calendar.php',