chromium support
Release Firefox and Chromium extensions / Package and attach browser extensions (release) Successful in 54s

This commit is contained in:
2026-08-30 21:00:05 +02:00
parent 0b1e567781
commit df16075421
14 changed files with 350 additions and 57 deletions
+5 -3
View File
@@ -1,6 +1,8 @@
(function () {
"use strict";
const api = typeof browser === "object" ? browser : chrome;
const status = document.getElementById("status");
const toggle = document.getElementById("toggle");
const fontStyleInputs = [...document.querySelectorAll('input[name="font-style"]')];
@@ -39,11 +41,11 @@
toggle.disabled = true;
toggle.setAttribute("aria-pressed", "false");
toggle.textContent = "Unavailable on this page";
status.textContent = "Firefox protects this page from extensions.";
status.textContent = "The browser protects this page from extensions.";
}
async function askBackground(type, extra = {}) {
return browser.runtime.sendMessage({ type, ...extra });
return api.runtime.sendMessage({ type, ...extra });
}
toggle.addEventListener("click", async () => {
@@ -104,7 +106,7 @@
async function initialize() {
try {
const tabs = await browser.tabs.query({ active: true, currentWindow: true });
const tabs = await api.tabs.query({ active: true, currentWindow: true });
if (!tabs[0] || typeof tabs[0].id !== "number") {
showUnavailable();
return;