Suggestion: Make the function to directly insert emojis optional and on-demand
harl opened this issue · 13 comments
This latest change that allows the extension to directly insert emojis on webpages also needs the permission to access all data on all sites, which is requested automatically when updating the extension.
I have no reason to doubt your intentions so far, but this “inconvenience” (or uncertainty) could be prevented.
For Firefox extensions, there's a way to only request additional permissions when they're actually needed, for example when the user wants to enable a certain option within the extension.
I don't know how this is done code-wise or if it would work with Emoji, but I've seen on-demand permissions in other extensions.
It would definitely be the more user-friendly and more trustworthy practice, contrary to just enabling the option by default (which “forces” everyone to accept the permission before the extension can be updated).
@harl Hi!
Thanks to opened the issue.
I'm looking for a fix, but I don't know how to make the permission optional.
Although exists "optional_permissions", to use "content_scripts" is required "permissions" is mandatory.
Can you help me if you're a developer?
(@navid-zamani do you have any ideas?)
The new option works e.g. in the Google search, but for me it does not work in Twitter. No emoji is inserted when composing a new tweet. 🤔 (It also works here, so there seems to be something special about twitter)
@Cpt-KeksMonster
I'll see and try to fix later 😄
@Cpt-KeksMonster: I just looked into Twitter’s search, because I don’t have an account, and it is … weird. It has an input field, but that isn’t what’s displayed. So I suspect some scripting magic in the background.
Sorry, I stopped being a professional webdev in 2007, before HTML5, because of exactly stuff like this. (I had a 4 hour discussion with the WhatWG guys back then, and as somebody with two psychologists in the family, I must say that they are certified insane. ;)
So I do not know how these techniques used there, and don’t want to either.
Your operating system should already have a function for inputting emoji, and this add-on is useful to me because that isn’t always available. (Like in Firefox on Linux Mint with Cinnamon.)
I am unable to help there. I can only suggest rewriting the extension to simulate keyboard input or a paste from the clipboard, instead of modifying the HTML of the page.
@Sav22999: Sorry, I’m not an Android developer. So I’m not into the depths of these things. I only got lucky with that last thing. :)
I myself do not have a problem with the permission.
But I don’t remember the other extension requiring me to allow any permissions. So maybe they did something special. Like the permission being there from the first version, so it didn’t come in later, so people who chose to install it already agreed by installing it, and it wasn’t asked for later, like it would be for this extension, where it would be a new permission. Can you check if you get asked for that permission if you completely uninstall your extension and then re-install it? Maybe try installing it on a new, separate Firefox profile, in case Firefox remembers giving permission to extensions even after they have been uninstalled?
This is the permission API documentation, explaining about optional permissions. Please update and release a new version with optional feature.
The extension is useful, when a keyboard is an option.
Yup, I know "optional_permission" but the problem is "content_scripts" require (actually insert automatically) that permission as "required", so I cannot in any way use it as optional, otherwise I need to change (but I don't know how to do it) the whole process (removing "content_scripts" for example).
Do you have any ideas?
@Cpt-KeksMonster: I just looked into Twitter’s search, because I don’t have an account, and it is … weird. It has an input field, but that isn’t what’s displayed. So I suspect some scripting magic in the background.
That's totally ok for me, so I'll stick with the clipboard. Thanks for your effort! 🙏
The new option works e.g. in the Google search, but for me it does not work in Twitter. No emoji is inserted when composing a new tweet. thinking (It also works here, so there seems to be something special about twitter)
Twitter uses a regular div
+ js magic, see #54
@Sav22999 I found this page about contentScripts, in my opinion you should read for a flagged setting (default to false), for example "automate copy and paste".
Then, on runtime check for it and if true trigger the script loading at runtime and unload.
That may be more transparent to users.
There could be a percent of probability the "automatic stuff" can't run (#54 for example) but old ugly manual cut-paste maybe more reliable.
@tassoman @harl @marcosins @Cpt-KeksMonster Implemented in 3.14.2!
Please, let me know if it works correctly.
Unluckily, because of some problems with injection, I need to require also "tabs" permissions
Thank you for working on this!
Unluckily, because of some problems with injection, I need to require also "tabs" permissions
What are the problems?
I've release a new update 3.14.3 and I ask for access data only 😊😊
No "tabs" permission required anymore 💪