ken107 / read-aloud

An awesome browser extension that reads aloud webpage content with one click
https://readaloud.app
MIT License
1.36k stars 233 forks source link

"Read aloud selected text" right click context menu no longer visible in Firefox ESR/Tor Browser after disabling/reinstalling #370

Closed Shoozza closed 9 months ago

Shoozza commented 9 months ago

In the past there was a context menu entry "Read aloud selected text" in Firefox.

New installations of the Addon will not add this context menu entry. If the Addon is disabled and enabled again (and the context menu was previously visible) the context menu will disappear.

Tested with Firefox ESR and Tor Browser.

Shoozza commented 9 months ago

Workaround: 1) Enable/Install Read Aloud addon from Firefox Addons Page 2) Download "read_aloud-1.66.0.xpi" (or current version xpi file of the addon) file (visit addon page with a different browser) 3) Drag and drop xpi file into firefox tabbar 4) Switch to tab and click ok

Result: Contextmenu appears again

Not sure why it's not appearing first time the addon is installed.

ken107 commented 9 months ago

Turns out been doing it wrong all this time lol. https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/menus/create

persistent background pages: in Chrome, menu items from persistent background pages are persisted. Create your menus in a runtime.onInstalled listener. in Firefox, menu items from persistent background pages are never persisted. Call menus.create unconditionally from the top level to register the menu items.

Thank you for reporting the issue.