obsidian-clipper icon indicating copy to clipboard operation
obsidian-clipper copied to clipboard

Add-on not working on Firefox

Open kmf opened this issue 2 years ago • 3 comments

image

Tested on Firefox 109.0

Old Version (0.3.6): https://addons.mozilla.org/en-US/firefox/addon/obsidian-clipper/

kmf avatar Jan 17 '23 16:01 kmf

Not sure about @jplattel's plans, but to me it feels like chrome/firefox compatibility is not comming back anytime soon.

EDIT: I am an amateur .... that's all. 😄

I'm trying to hack my version locally at the monent. Will report on my results. 😆

ondrahlavac avatar Aug 04 '23 21:08 ondrahlavac

Ok, so I'm back with the news.

There has been an issue with new version of manifest. Google pushed for the quick adoption of Manifest V3 and Firefox has not finalized their implementation.

Nevertheless, two things need to change for this to work with Firefox.

  1. manifest.json for the firefox build needs to keep the following definiton, as it was in Manifest V2: "background": { "scripts": ["background.js"], "type": "module" },
  2. Since the new chrome.storage.sync is being used, firefox needs Add-on ID to be added to manifest.json. "browser_specific_settings": { "gecko": { "id": "[email protected]" } }

References:

  • Manifest V3 and background workers
    • some info in the comments here: https://github.com/mozilla/web-ext/issues/2532
  • Add-on ID
    • https://extensionworkshop.com/documentation/develop/extensions-and-the-add-on-id/
    • https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/browser_specific_settings

Next steps

Normally, I would send a pull request, but this is something for Joost (@jplattel) to decide. Basically you need to build with two different manifests for firefox and chrome.

I got my version running as unsigned addon - https://github.com/ondrahlavac/obsidian-clipper/tree/personal-version But it's just a hack, not a fix.

So... @jplattel, can I somehow be of service so we can get this fixed? :-)

ondrahlavac avatar Aug 05 '23 02:08 ondrahlavac

@kmf @mcheck You can use my hacked version - obsidian_clipper_for_firefox-0.5.x.zip https://github.com/ondrahlavac/obsidian-clipper/tree/personal-version/

Just to carry us over before we find a way to get it all sorted and get a fresh new version to addons.mozilla.org

ondrahlavac avatar Aug 05 '23 02:08 ondrahlavac