views:

45

answers:

1

I'm creating a Firefox add-on that does the following:

  • Drag+drop a file into Firefox
  • If the file has a certain extension and if FF is running on a certain OS, parse the file with regex
  • Extract a url
  • Go to that page

The JavaScript for all of this is pretty straight-forward except for the drag+drop into FF part. How can that be done?

I would just use the Options->Application to have the file open with a parsing app that can then open the url in FF, but FF doesn't recognize my file and won't allow me to associate an app for the file typs using 'always open with' (the checkbox is disabled).

+1  A: 

There is a extension that does the drag&drop stuff (drag&drop upload ). You could look at it. https://addons.mozilla.org/en-US/firefox/addon/2190

Emmanuel Caradec