Well one way to do it would be to add support for it to the calibre content server. Add a URL endpoint that passes calibre:// URLs to calibre when the content server is running from within calibre itself. Your browser extension then just needs to connect to this endpoint, the only tricky bit being how it finds out what ip address/port the server is listening on, you can always punt to having the user tell you that.
Also, exposing the calibre url scheme to the net may not be the safest so best to only pass it on for connections from localhost.
|