bramus / mastodon-redirector

View Mastodon profiles on your Mastodon instance

Home Page:https://chrome.google.com/webstore/detail/mastodon-view-profile/limifnkopacddgpihodacjeckfkpbfoe

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Extension is not available in Firefox Add-On Store

bramus opened this issue · comments

Firefox also supports v3 manifests (as of Firefox 109), so it should also be possible to ship it there as well …

Work is being done in the https://github.com/bramus/mastodon-profile-redirect/tree/firefox branch.

Doesn’t seem like it’ll work though. Getting back

$ web-ext run --firefox-preview
Running web extension from /Users/bramus/repos/projects/mastodon-profile-redirect/src
Configuring Firefox preferences for Manifest V3
Setting custom Firefox preferences: {
  "extensions.manifestV3.enabled": true
}
Use --verbose or --devtools to see logging

WebExtError: installTemporaryAddon: Error: Error: Could not install add-on at '/Users/bramus/repos/projects/mastodon-profile-redirect/src': Error: background.service_worker is currently disabled
    at RemoteFirefox.installTemporaryAddon (file:///Users/bramus/.nvm/versions/node/v18.12.1/lib/node_modules/web-ext/lib/firefox/remote.js:90:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async FirefoxDesktopExtensionRunner.startFirefoxInstance (file:///Users/bramus/.nvm/versions/node/v18.12.1/lib/node_modules/web-ext/lib/extension-runners/firefox-desktop.js:218:27)
    at async FirefoxDesktopExtensionRunner.run (file:///Users/bramus/.nvm/versions/node/v18.12.1/lib/node_modules/web-ext/lib/extension-runners/firefox-desktop.js:51:5)
    at async Promise.all (index 0)
    at async MultiExtensionRunner.run (file:///Users/bramus/.nvm/versions/node/v18.12.1/lib/node_modules/web-ext/lib/extension-runners/index.js:68:5)
    at async run (file:///Users/bramus/.nvm/versions/node/v18.12.1/lib/node_modules/web-ext/lib/cmd/run.js:178:3)
    at async Program.execute (file:///Users/bramus/.nvm/versions/node/v18.12.1/lib/node_modules/web-ext/lib/program.js:263:7)
    at async file:///Users/bramus/.nvm/versions/node/v18.12.1/lib/node_modules/web-ext/bin/web-ext.js:13:1

The tracking bug to support background.service_worker is still open.

mozilla/web-ext#2379 (comment) suggests to use a separate manifest for Firefox, using the old way …

After some trial and error I got it working: 2a2e17a

A build has been submitted, awaiting approval …

Extension has been approved and is now published: https://addons.mozilla.org/en-US/firefox/addon/mastodon-profile-redirect/

Note that it is only compatible with Firefox 109 and up due to the usage of Manifest v3. To make it work in Firefox prior to 107, follow these instructions