You're correct that we don't have the specific APIs you asked about. However, I think what you're trying to accomplish is very doable with content scripts. It's mostly a question of how you'd like to expose the UI.
For example, in your content script, you could search for all <a> objects with an href and install some UI (a floating div or something) that would appear when you hovered over the link (or clicked with a modifier, or something) and let you kick off your JSON request. Or you could just make your content script discover the links on a page, and add a page action button that would popup a window that listed all of the links with checkboxes next to them and let them pick which ones they want to download. The problem here is that you don't know for sure which links are interesting "download" links and which ones are "navigate" links ahead of time, so you'll either need some heuristics (file extension or other hints), or you'll just act on any link on the page. Erik On Tue, Oct 6, 2009 at 9:21 AM, javier.monteagudo <[email protected]> wrote: > > Hi all, > > I'm working on an extension to use chrome with the fon's wifi router > fonera2.0n. It's a router with a json-rpc interface with which you can > add download urls so the router downloads files automatically to an > attached usb disk automatically. We have already done an extension for > firefox with that functionallity and we're willing to do the same for > chrome, but I've found some problems implementing this: > > We need some way to manipulate urls from a webpage and we've done that > successfully on our Firefox extension via a right click menu. Another > possibility would be to add a handler to tell chrome to not download > the target of the link (as would do with regular binary files) but to > do something else, but I don't know if with the current API we can do > that, since your API still doesn't offer that kind of functionality > (or at least we're not aware of it). > > We would appreciate some kind of guidance with this problem. > > Thanks, > Javier > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Chromium-extensions" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/chromium-extensions?hl=en -~----------~----~----~----~------~----~------~--~---
