refactor(background): remove background.html and import directly as ES module

This commit is contained in:
Thomas Rupprecht 2023-05-24 19:42:58 +02:00
parent 0d88ee76e2
commit 7a707c9fb0
3 changed files with 4 additions and 14 deletions

View File

@ -1,10 +0,0 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8" />
<title>/usr/space</title>
<!-- [INJECT-BROWSER-POLYFILL] -->
<script type="module" src="background.js"></script>
</head>
</html>

View File

@ -1,6 +1,5 @@
import { REFRESH_TIMEOUT, API_URLS, BADGE_COLORS } from './config.js'; import { REFRESH_TIMEOUT, API_URLS, BADGE_COLORS } from './config.js';
// [INJECT-BROWSER-POLYFILL]
document.querySelector('html').setAttribute('lang', browser.i18n.getUILanguage());
browser.runtime.onInstalled.addListener(async (details) => { browser.runtime.onInstalled.addListener(async (details) => {
if (details.reason === 'install') { if (details.reason === 'install') {

View File

@ -8,7 +8,8 @@
"96": "icons/favicon.svg" "96": "icons/favicon.svg"
}, },
"background": { "background": {
"page": "background.html" "type": "module",
"scripts": ["background.js"]
}, },
"action": { "action": {
"browser_style": true, "browser_style": true,
@ -32,7 +33,7 @@
"browser_specific_settings": { "browser_specific_settings": {
"gecko": { "gecko": {
"id": "{c9a907ad-a047-4cf6-8b5d-95097d31aa5b}", "id": "{c9a907ad-a047-4cf6-8b5d-95097d31aa5b}",
"strict_min_version": "109.0" "strict_min_version": "112.0"
} }
} }
} }