refactor(config): move homepage url to config
This commit is contained in:
parent
8aa6db1275
commit
f3d8199b97
|
@ -13,6 +13,10 @@ All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
- Correctly update the changelog on release
|
- Correctly update the changelog on release
|
||||||
|
|
||||||
|
### 🚜 Refactor
|
||||||
|
|
||||||
|
- Improve browser-polyfill inject
|
||||||
|
|
||||||
### 📚 Documentation
|
### 📚 Documentation
|
||||||
|
|
||||||
- Add logo and screenshot to readme
|
- Add logo and screenshot to readme
|
||||||
|
|
|
@ -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]
|
// [INJECT-BROWSER-POLYFILL]
|
||||||
|
|
||||||
browser.runtime.onInstalled.addListener(async (details) => {
|
browser.runtime.onInstalled.addListener(async (details) => {
|
||||||
if (details.reason === 'install') {
|
if (details.reason === 'install') {
|
||||||
await browser.tabs.create({
|
await browser.tabs.create({
|
||||||
url: 'https://www.usrspace.at/',
|
url: HOMEPAGE,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
export const REFRESH_TIMEOUT = 5;
|
export const REFRESH_TIMEOUT = 5;
|
||||||
|
|
||||||
|
export const HOMEPAGE = 'https://www.usrspace.at/';
|
||||||
|
|
||||||
export const API_URLS = {
|
export const API_URLS = {
|
||||||
spaceApi: 'https://www.usrspace.at/spaceapi.json',
|
spaceApi: 'https://www.usrspace.at/spaceapi.json',
|
||||||
calender: 'https://www.usrspace.at/calendar.php',
|
calender: 'https://www.usrspace.at/calendar.php',
|
||||||
|
|
Loading…
Reference in a new issue