1
Fork 0

Compare commits

...

4 Commits

4 changed files with 10 additions and 5 deletions

View File

@ -53,7 +53,10 @@ args = ["web-ext", "build", "--config=build/web-ext-${BROWSER}.json"]
[tasks.run]
clear = true
command = "pnpm"
args = ["web-ext", "run", "--config=build/web-ext-${BROWSER}.json"]
# Set --target explicitly, since web-ext for some reason doesn't use the target
# set in the configuration file. https://github.com/mozilla/web-ext/issues/1862
env = { TARGET = { source = "${BROWSER}", default_value = "${BROWSER}", mapping = { "firefox" = "firefox-dekstop" } } }
args = ["web-ext", "run", "--target=${TARGET}", "--config=build/web-ext-${BROWSER}.json"]
# Alias for `WATCH=true makers build`.
[tasks.watch]

View File

@ -19,8 +19,6 @@ export function createManifest(browser: string): Manifest.WebExtensionManifest {
page: "options/index.html",
open_in_tab: true,
},
content_security_policy:
"script-src 'self'; object-src 'self'; style-src 'unsafe-inline'",
content_scripts: [
{
css: ["css/content-scripts.css"],
@ -53,6 +51,8 @@ export function createManifest(browser: string): Manifest.WebExtensionManifest {
strict_min_version: "102.0",
},
};
manifest.content_security_policy =
"script-src 'self'; object-src 'self'; style-src 'unsafe-inline'";
} else if (browser === "chromium") {
manifest.manifest_version = 3;
manifest.action = action;

View File

@ -33,7 +33,7 @@
.group {
border: 1px solid var(--blue);
overflow: scroll;
overflow: hidden;
padding: 16px;
h2 {
@ -41,7 +41,7 @@
display: flex;
gap: 8px;
margin-bottom: 16px;
overflow: scroll;
overflow: auto;
}
input {

View File

@ -19,6 +19,7 @@ type WebExtConfig = {
run: {
browserConsole: boolean;
chromiumProfile: string;
firefoxProfile: string;
keepProfileChanges: boolean;
profileCreateIfMissing: boolean;
@ -53,6 +54,7 @@ export function createWebExtConfig(
run: {
browserConsole: dev,
chromiumProfile: path.join(buildDir, "chromium-profile/"),
firefoxProfile: path.join(buildDir, "firefox-profile/"),
keepProfileChanges: true,
profileCreateIfMissing: true,