zaidka / cliget

A Firefox addon to download login-protected files from the command line
https://addons.mozilla.org/en-US/firefox/addon/cliget/
Mozilla Public License 2.0
357 stars 57 forks source link

Is it possible to port this add on to WebExtension? #46

Closed BeyondTheBoundary closed 7 years ago

BeyondTheBoundary commented 7 years ago

This is a great extension. I really miss it when I'm using FF 57 (Nightly). I willing to help port this to WebExtension, but I wonder is it possible to port, or this is the end of this add on?

https://developer.mozilla.org/en-US/Add-ons/WebExtensions/user_interface

zaidka commented 7 years ago

It is possible and I'm working on it. However, the UI will not be the same. With WebExtensions it's unfortunately not possible to modify the download dialog. This is how it's going to look like:

screenshot from 2017-08-22 12-43-43

BeyondTheBoundary commented 7 years ago

Oh, great. Thank you. A search box/ filter would be helpful. 😄

But so sad that the UX can not be the same. Do you have a solution to catch user download event?

zaidka commented 7 years ago

Do you have a solution to catch user download event?

Yes, but not directly so I'm not sure how well it's going to work. The problem is that we can only receive download events after the user chooses to save the file, so if the user cancels the download before it's started no event is sent. The workaround is to listen to all outgoing requests and eliminate those associated with a browser tab. So hopefully the cliget menu will show all downloads including canceled ones.

zaidka commented 7 years ago

A search box sounds like a great idea.

TimoRoth commented 6 years ago

The problem I see with this are "one-time" downloads, which invalidate the link by starting the download. Like various one-click hosters and other sites.

roblabla commented 6 years ago

I wonder, wouldn't it be possible to behave like a "proxy" to catch the download before it even starts, and make it fail ASAP ?

zaidka commented 6 years ago

That shouldn't be more of a problem than the current implementation because the download actually starts in the background before you can get a chance to hit save or cancel.

antitoine commented 6 years ago

Any news about the release of the cliget WebExtension ? This morning, my firefox switch to the 57 version (Developer Edition) and I can't use it anymore. If you want to, @zaidka, I can test your addon and give you a feedback!

joehillen commented 6 years ago

@zaidka Will the context menu entry be in the new version?

zaidka commented 6 years ago

@joehillen Yes.

lilydjwg commented 6 years ago

I have an idea:

  1. the user clicks a button or something to indicate that the next download should be caught by cliget
  2. cliget intercepts the next download request and opens a page showing commands
  3. the user can then select to cancel (and use a provided command) or continue the request (maybe because a wrong request is caught)

(I tried to do the similar with devtools, but it doesn't show the details until it completes, so I have to cancel the download to copy as cURL.)