EINDEX/logseq-copilot

Badge is missing in Firefox

jinliu opened this issue · 2 comments

The extension icon's badge is missing in Firefox.

Debugging the extension shows this error:

Uncaught (in promise) TypeError: import_webextension_polyfill2.default.action is undefined
setExtensionBadge moz-extension://d7aec16b-630f-43c4-bd8c-f65d7dfc7020/background.js:8972
badgeSearch moz-extension://d7aec16b-630f-43c4-bd8c-f65d7dfc7020/background.js:10674

This is because Browser.action requires manifest v3 (https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/action), but for Firefox we use v2 (I suppose because Firefox doesn't support v3 background service worker?).

Possible solution:
Call Browser.browserAction instead (https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/browserAction)

Firefox 109 supports V3.

And Logseq Copilot Firefox users are using 110 to 112, only 1 using version 92.

image

I think is suit to upgrade to V3.

https://extensionworkshop.com/documentation/develop/manifest-v3-migration-guide/


no work, CSP block the Funtion. And Firefox disallows 'unsafe-eval' and 'inline-eval' for CSP.

fix it at v1.10.20