From f3d8199b97549da696e8428659b77538ac5ea426 Mon Sep 17 00:00:00 2001 From: Thomas Rupprecht Date: Thu, 1 Jun 2023 00:02:31 +0200 Subject: [PATCH] refactor(config): move homepage url to config --- CHANGELOG.md | 4 ++++ src/background.js | 4 ++-- src/config.js | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27a597a..3f59ec3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/background.js b/src/background.js index 027c160..92bf623 100644 --- a/src/background.js +++ b/src/background.js @@ -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, }); } }); diff --git a/src/config.js b/src/config.js index acb53d0..8a33136 100644 --- a/src/config.js +++ b/src/config.js @@ -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',