1

When you Hold Cmd (Ctrl on windows) and click on a link in a tab, Chrome opens that links in a new tab.

I Would like to respond to a similar click event while holding a key combination of my choosing. I am trying to write a chrome extension that send a particular link a page to an application via a REST API that will further process it there. I can accomplish this with Context Menu Items, but I wanted to try something with a faster UX.

I know how to respond to Keyboard shortcuts (via the chrome.commands api) and I know how to respond to clicks. But I would like to call a function to send a link (via XMLHttpRequest) that I clicked on while holding a key combination.

For instance get the link i click in a page when: Hold Cmd-Shift + LMB

I am new to Chrome extensions but not programming in general. I Choose to develop a Chrome extension instead of a Firefox one because, well, it's just a lot easier in Chrome!

Any feedback, pointers, or direction on how I could accomplish this would be appreciated. I have searched and googled and researched, and now turn to you for advice. I hope I have met the S/O question guidelines by being specific.

Thanks for your time and Effort.

Rudker
  • 691
  • 1
  • 5
  • 14
  • 1
    Closing as buplicate because it's not supported by any Chrome-specific APIs - you'll need to inject content script code to all pages and do it the above way. – Xan Dec 05 '15 at 09:31
  • OK thanks guys. I will check those other questions. Wish I could have found them before. I must have only been looking for chrome api specific answers. Not realizing this would have to be accomplished outside of the chrome api. – Rudker Dec 05 '15 at 17:20

0 Answers0