ayoung19 / clipboard-history

A Chrome extension for managing your clipboard history securely, efficiently, and effortlessly.
https://chromewebstore.google.com/detail/clipboard-history-pro-sec/ombhfdknibjljckajldielimdjcomcek?hl=en
Apache License 2.0
23 stars 5 forks source link

core: add functionality to view and paste copied content directly from context menu #29

Open morph1nX opened 3 weeks ago

morph1nX commented 3 weeks ago

User should be able to paste copied content directly from the browser context menu

Useful links:

https://developer.chrome.com/docs/extensions/reference/api/contextMenus#type-CreateProperties

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/user_interface/Context_menu_items

morph1nX commented 1 week ago

Problems I am facing -

  1. How to signal to the context menu that items have been added or removed from storage, so that the menu can be remade. Currently I am doing it by sending a message to the menu using chrome.runtime.sendMessage
  2. How to get the input element where the context menu has been opened so that the value from the menu can be pasted there.

problem 2 might have some help from here

https://issues.chromium.org/issues/40375229#comment15

https://stackoverflow.com/questions/7703697/how-to-retrieve-the-element-where-a-contextmenu-has-been-executed