Hi. No offense, but your code's kinda. I made 2 versions that should work better- one for Tampermonkey(any userscript extension) The second one can just be pasted into the console. If you can think of any ideas or find errors, just reply. I made this code in 15 minutes, so It's not a big deal for me.
Console Version
I capped it at 4 downloads at once so your browser doesn't explode, but you can tweak that in the concurrentDownloads variable. It's also async now, so no more hanging on one bad file.
Files will be named like this: lastURLfragment_originalFileName. Sadly, making folders for each thread with plain JavaScript is impossible without extensions :(
Here's the code for the console:
'use strict';
// Function which starts downloading files when elements are loaded
const startDownloads = () => {
const names = Array.from(document.getElementsByClassName("originalNameLink"));
(async () => {
Message too long. Click
here
to view full text.