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] [tasks.run]
clear = true clear = true
command = "pnpm" 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`. # Alias for `WATCH=true makers build`.
[tasks.watch] [tasks.watch]

View File

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

View File

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

View File

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