-
I'm trying to build an extension for the Android version of Firefox that adds a custom option to the context menu that pops up when you select text. However, I'm having difficulty getting any button to show up. I tried installing this example with no changes on my Firefox Night for Developers app. I see the extension in the app, but no "Copy link to clipboard" button appears in the context menu. Is this a known limitation of Firefox's Android app or am I missing something basic? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Mentioning @mdn/yari-content-mozilla-add-ons who may be able to provide insight here |
Beta Was this translation helpful? Give feedback.
-
We do not support this API on Firefox for Android. |
Beta Was this translation helpful? Give feedback.
-
If we ever decide to support it, then there would be activity at https://bugzilla.mozilla.org/show_bug.cgi?id=1595822 Your currently available option is to use add a browserAction button (or simply called action in MV3) to your extension and use scripting.executeScript + |
Beta Was this translation helpful? Give feedback.
If we ever decide to support it, then there would be activity at https://bugzilla.mozilla.org/show_bug.cgi?id=1595822
Your currently available option is to use add a browserAction button (or simply called action in MV3) to your extension and use scripting.executeScript +
window.getSelection()
to get the current text selection (assuming that it is in the top-level document), and then the navigator.clipboard or document.execCommand API to do the actual copy.