Best way to create a download manager that works on multiple browsers, starting with Firefox

Hello, I really wasn’t sure where to ask this but figured I might as well any way, I will probably get moved to wherever I need to be if I am not (or removed.)

I was going to start work on this program that automatically sorts and manages files you download for you, including offering to automatically “install” files (either literally install installer type programs, unpack a zip file or some other archive that holds some executable program and make a shortcut to it on your desktop/in your start menu, or just do something with the file upon downloading to make it useful automatically,) and after looking around and asking for advice elsewhere, I think the best way to do this would be to implement this program as a download manager like Internet Download Manager and the like and then do my functionality on the side. To my understanding, for Firefox specifically, there should be at least three ways:

  • I am told there is a setting that just lets you manage all file associations with an external program if Firefox hasn’t set one or something along those lines, but the guy describing this couldn’t link me to any documentation whatsoever and all I know is that it might be a real thing. I can’t find this setting and I am not gonna bother perusing about:config until I can find it. I was shown this docs page about handlers, but I would guess it’s the same as the next bullet point but with mayhaps the ability to make a wildcard that matches all downloads from anywhere to my program?
  • I could just use a hack and make every Firefox file association match with my downloader, but I figure this is not the right solution, would make the program hard to uninstall, and could probably be done better by the final option unless it somehow makes itself easy.
  • Just make an extension that runs my program and uses the APIs available to access downloads.

None of these seem like great options as is - the first one might literally not even be real, the second is super hacky and would stop working if for example Firefox changed how file associations work (and there may be no way to do this for every permutation of file format,) and the third requires me to do a bunch of legwork just to get it working (and I have seen another extension that claims to be able to do this require installing NodeJS locally.)

My only other choices seem to be finding some way to detect new files in the Downloads folder and then operate off of that automatically, but something tells me that it’s better to function as a download manager to manage and manipulate the downloads.

(Side note: I do not care that this program will probably make me zero dollars and zero users aside from me - I will do the project anyway. I also specifically want to have access to the native file system, installation of native programs, a native UI, etc., so I don’t want to just make it an extension either.)