File 0001-Disable-browser-extension-quirk-in-UI.patch of Package webwormhole
From 7f3516290171804d34a86c65b722ba69d91602d0 Mon Sep 17 00:00:00 2001
From: Mia Herkt <mia@0x0.st>
Date: Fri, 29 Aug 2025 16:41:48 +0200
Subject: [PATCH] Disable browser extension quirk in UI
---
web/main.js | 6 ------
web/sw.js | 11 -----------
2 files changed, 17 deletions(-)
diff --git a/web/main.js b/web/main.js
index b5070a5..3a08fba 100644
--- a/web/main.js
+++ b/web/main.js
@@ -633,12 +633,6 @@ function browserhacks() {
hacks.noclipboardapi = true;
console.log("quirks: clipboard api not supported");
}
- // Are we in an extension?
- if (window.chrome && chrome.runtime) {
- hacks.ext = true;
- hacks.nosw = true;
- console.log("quirks: browser extension");
- }
}
async function domready() {
return new Promise((resolve) => {
diff --git a/web/sw.js b/web/sw.js
index 28381d6..ceb423e 100644
--- a/web/sw.js
+++ b/web/sw.js
@@ -154,14 +154,3 @@ sw.addEventListener("fetch", (e) => {
// Default to passthrough.
e.respondWith(fetch(e.request));
});
-
-if (chrome && chrome.runtime) {
- chrome.action.onClicked.addListener(() => {
- chrome.windows.create({
- type: "panel",
- url: chrome.runtime.getURL("index.html"),
- width: 600,
- height: 600,
- });
- });
-}
--
2.51.0