Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a contextual menu #184

Open
6 tasks
micz opened this issue Nov 23, 2024 · 0 comments
Open
6 tasks

Add a contextual menu #184

micz opened this issue Nov 23, 2024 · 0 comments

Comments

@micz
Copy link
Owner

micz commented Nov 23, 2024

Add a contextual menu that let the user use a prompt on the selected text.

  • Add a new properties to prompts, to choose if the prompt has to be shown in the context menu (available only if a selection is needed).
  • Add the methods to the background script to create the context menu. Filter the menu also with the type attribute (just before showing it?).
  • Pass to the AI popup the tab type we are coming from. If it's a mailTab, a compose window or a generic window.
  • In the AI popup change the allowed actions depending of the tab type we are coming from.
    • Composing and reading, keep the actual actions.
    • Generic webpage, copy to clipboard and close.



Available info when clicking the menu item:


Generic window

>>>>>>>>> info: {"menuItemId":2,"parentMenuItemId":3,"viewType":"tab","frameId":0,"editable":false,"targetElementId":2059837,"pageUrl":"https://web.telegram.org/a/","selectionText":"prova questo","modifiers":[],"button":0} [background.js:51:17](moz-extension://4daf2c62-7aadasd5e85ed07/background.js)
>>>>>>>>> tab: {"id":7,"index":4,"windowId":1,"highlighted":true,"active":true,"status":"complete","width":1206,"height":681,"cookieStoreId":"firefox-default","type":"content","mailTab":false}



Tab mail window

>>>>>>>>> info: {"menuItemId":2,"parentMenuItemId":3,"editable":false,"pageUrl":"imap://micthdev%[email protected]:993/fetch%3EUID%3E/%5BGmail%5D/Sent%20Mail%3E43","selectionText":"vediamo ","modifiers":[],"button":0} [background.js:51:17](moz-extension://4daf2c62-7aa4-4808-bafd-0bc65e85ed07/background.js)
>>>>>>>>> tab: {"id":4,"index":0,"windowId":1,"highlighted":true,"active":true,"status":"complete","width":789,"height":370,"cookieStoreId":"firefox-default","spaceId":1,"type":"mail","mailTab":true}



Compose window

>>>>>>>>> info: {"menuItemId":2,"parentMenuItemId":3,"editable":true,"pageUrl":"about:blank?compose","selectionText":"dssdfsdf","modifiers":[],"button":0} [background.js:51:17](moz-extension://4daf2c62asd4808-asd85ed07/background.js)
>>>>>>>>> tab: {"id":9,"index":0,"windowId":93,"highlighted":true,"active":true,"status":"complete","width":860,"height":581,"cookieStoreId":"firefox-default","type":"messageCompose","mailTab":false}



[Originally proposed by @grossherr in #180]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant