EINDEX / logseq-copilot

Logseq Copilot is a Browser extension that allows you to access your Logseq via your browser.
https://logseq-copilot.eindex.me
GNU General Public License v3.0
235 stars 21 forks source link

Badge is missing in Firefox #20

Closed jinliu closed 1 year ago

jinliu commented 1 year ago

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)

EINDEX commented 1 year ago

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.

EINDEX commented 1 year ago

fix it at v1.10.20