简体   繁体   中英

How do skype extensions for browsers actually work?

We have plans of developing a web application that will have to communicate with our locally running application. One of the possible options is using browser extensions. I was looking into how Skype add-ons to browsers communicate with Skype client. In Firefox, Skype add-on inserts a piece of HTML when it encounters a phone number. Is this

<span skypeaction="...">

processed by a Skype extension which makes a call using Skype API? Do extensions for other browsers use Skype API or other communications mechanism?

I did a bit of research and here's what I found. When the user clicks on the Skype link injected by the extension, the extension creates a new Skype process and passes it the parameters specifying the action and the number. Custom protocol handler is not used.

The Skype extension would use regular expressions to search for valid and visible phone numbers displayed on a webpage, and as you say it would wrap a span class around it.

The span class would be defined within the extension code, and would insert the skype icon along with a clickable link that launches the skype application.

You also see similar functionality from iTunes and IRC, they have links in the irc://... format.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM