Question

I'm developing a click-to-dial tool, and would like to pass all tel: links in firefox to my extension, which will then run click to dial

so

<a href="tel:01223236103">Call this customer</a> 

should silently be passed to my extension to deal with and not ask the user which external application they wish to launch

This is primarily for Mac users although it should ideally be a cross-platform solution (so handled within the JavaScript rather than using any external applications)

Any suggestions where to look/what to Google?

Was it helpful?

Solution 2

I solved this by writing and registering my own protocol handler

  1. Mike's blog gives a helpful walkthrough

  2. Mozillazine explains what you're doing

OTHER TIPS

How protocol URLs are handled is something that's determined by the operating system. You can see more details in this article.

What you'll want to do is run a content script on each page to detect tel: links and register a click handler on them. This click handler could perform the action you want, then return false to prevent any further action being taken.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top