The DownThemAll! WebExtension
The DownThemAll! WebExtension.
For those still on supported browser: Non-WebExtension legacy code.
This is the WebExtension version of DownThemAll!, a complete re-development from scratch. Being a WebExtension it lacks a ton of features the original DownThemAll! had. Sorry, but there is no way around it since Mozilla decided to adopt WebExtensions as the only extension type and WebExtensions are extremely limited in what they can do.
For what is planned (and not planned because impossible to do in WebExtensions), see TODO.md.
What this furthermore means is that some bugs we fixed in the original DownThemAll! are back, as we cannot do our own downloads any longer but have to go through the browser download manager always, which is notoriously bad at handling certain "quirks" real web servers in the wild show. It doesn't even handle regular 404 errors.
I spent countless hours evaluating various workarounds to enable us to do our own downloads instead of relying on the downloads API (the browser built-in downloader). From using
IndexedDBto store retrieved chunks via
XHR, to doing nasty service-worker tricks to fake a download that the backend would retrieve with
XHR. The last one looks promising but I have yet to get it to work in a manner that is reliable, performs well enough and doesn't eat all the system memory for breakfast. Maybe in the future...
What this also means is that we have to write our user interface in HTML, which never looks "native" and cannot offer deep OS integration.
But it is what it is...
What we can do and did do is bring the mass selection, organizing (renaming masks, etc) and queueing tools of DownThemAll! over to the WebExtension, so you can easily queue up hundreds or thousands files at once without the downloads going up in flames because the browser tried to download them all at once.
If you would like to help out translating DTA, please see our translation guide.
You will want to run
yarnto install the development dependencies such as webpack first.
Just use your favorite text editor to edit the files.
You will want to run
Please note: You have to run
yarn build(at least once) as it builds the actual script bundles.
If you did, then running
yarn webext(additionally to
yarn watch) will run the WebExtension in a development profile. This will use the directory
../dtalite.pto keep a development profile. You might need to create this directory before you use this command. Furthermore
yarn webextwill watch for changes to the sources and automatically reload the extension.
Alternatively, you can also
yarn build, which then builds an unsigned zip that you can then install permanently in a browser that does not enforce signing (i.e. Nightly or the Unbranded Firefox with the right about:config preferences).
You have to build the bundles first, of course.
Then put your Chrome into Developement Mode on the Extensions page, and Load Unpacked the directory of your downthemall clone.
To get a basic unofficial set of zips for Firefox and chrome, run
If you want to generate release builds like the ones that are eventually released in the extension stores, use
python3 util/build.py --mode=release.
The output is located in
-fx.zipare Firefox builds
-crx.zipare Chrome/Chromium builds
-opr.zipare Opera builds (essentially like the Chrome one, but without sounds)
yarn && python3 build/util.py --mode=release
Please submit your patches as Pull Requests, and rebase your commits onto the current
The code base is comparatively large for a WebExtension, with over 11K sloc of typescript. It isn't as well organized as it should be in some places; hope you don't mind.
uikit/- The base User Interface Kit, which currently consists of
VirtualTableimplementation, aka that interactive HTML table with columns, columns resizing and hiding, etc you see in the Manager, Select and Preferences windows/tabs
ContextMenuand related classes that drive the HTML-based context menus
lib/- The "backend stuff" and assorted library routines and classes.
windows/- The "frontend stuff" so all the HTML and corresponding code to make that HTML into something interactive
style/- CSS and images