xpmn / firefox-to-deepl

Firefox extension. Highlight text on a web page and send it to DeepL
https://addons.mozilla.org/en-US/firefox/addon/to-deepl/
MIT License
88 stars 8 forks source link

Use floating button instead of right click menu? #27

Closed gcobc12632 closed 1 year ago

gcobc12632 commented 1 year ago

Just like this: https://addons.mozilla.org/firefox/addon/simple-translate

When you select text, a floating button will appear.

After clicking, the DeepL pop-up window will be displayed.

Is this possible?

xpmn commented 1 year ago

Hi, thank you for your feedback, but I wanted to create extension with as minimum requirements as possible - this tiny popup is implemented by injecting fixed html block on top of the page content. For this I need to add permission "Access your data for all websites" which looks not so trustworthy for not verified extension. And in the next manifest v3 it will not be possible to set this permission. I decided to not implement this

gcobc12632 commented 1 year ago

I don't mean to be exactly like that addons.

I mean, when you select text. Show a floating button.

When you click it, show a DeepL pop-up window. (what you already have)

That's it. Is this also requires permission "Access your data for all websites"?

There is such an idea mainly because. The way it is now, you have to right-click first and then select the "To DeepL" option. It takes a total of two clicks. The floating button only needs to be clicked once.

If there is no way, it does not matter. This extension is already very good.

xpmn commented 1 year ago

Yes this also requires permission "Access your data for all websites" because there is no possibility to render popup icon with browser API. This is imitation with injecting floating block just inside of the page html