Hi all,
I've written an application in Mozilla (XUL + Javascript) which is a user interface for a particular type of data stored at a remote URL. This works great; I can simply type the chrome:// URL for the Mozilla app into the browser's location bar to start the application, and I'm currently passing the chrome the remote URL to operate on via the query parameter. e.g. if some remote data is stored at http://www.example.com/data.foo, I'm currently doing this:
chrome://fooviewer/content/fooviewer.xul?http://www.example.com/ data.foo
What I'm having trouble with is 'associating' the .foo extension (really, an application/x-foo MIME type) with the chrome://fooviewer/ application. e.g. if a user types in 'http://www.example.com/data.foo' into their browser, I'd like the chrome to appear in the browser window and act as a content handler/viewer for that particular MIME type. I've looked pretty hard at various Mozilla components, from nsIContentHandler to nsIURIContentListener, and can't figure out how to do this.
The tricky part is that I want to _hide_ the chrome:// URL from the user, i.e. the location bar should always show http://www.example.com/data.foo, rather than chrome://fooviewer/etc, even though the chrome is actually used. I'm sure this is possible to do, but I'm at an impasse about how to implement this. Any hints or pointers would be greatly appreciated!
P.S. I hope this is the best mailing list to use for this kind of problem; please tell me if there's a more appropriate mailing list that I missed. Thanks!
-- % Andre Pang : trust.in.love.to.save <http://www.algorithm.com.au/> _______________________________________________ Mozilla-netlib mailing list Mozilla-netlib@mozilla.org http://mail.mozilla.org/listinfo/mozilla-netlib