This article was for old Facebook Layout.
One of the most annoying thing in Facebook is that you can’t download all the files in once. So i was wondering, if i can find a solution for it, cause i had to install around 300 files from a facebook group. To install all group files in Facebook with one click or let’s say with one function. For this we need a web browser, plugin and a little Javascript Code, that’s all.
The Addon Downthemall was the best plugin for the Browser Mozilla Firefox. But Firefox does not support this Addon anymore. Let’s fix this issue!
Requirements
- An old Mozilla Firefox Browser ooooorrr the other easy alternative: Waterfox Browser. It’s an open-source Web Browser, which looks like Mozilla Firefox and supports all Addons of Mozilla Firefox.
- The Mozilla Firefox Addon: Downthemall (No worrys, I’ll show you how to download it)
- If you want to download the Files for once, i recommend to do it in a Virtual Machine. I’m using a Linux Distrubition in VMware Tool. I just want to be sure, that i don’t install Softwares on my physical Laptop.
- Last thing would be a little Javascript Knowledge, if you are not familiar with it, it is all okay 🙂
Install Waterfox Browser
To install Waterfox Browser just go on the official Website download and install it like Firefox.
How to install Downthemall Addon
To save our time the Developers of Waterfox has published a Wayback-Mashine-Link of Mozilla Firefox Addons. You can find it on the official Website.
On the Wayback Mashine Page you will see the unsupported Addons of Mozilla Firefox. Because it is a Mirror-Page of last time you can’t search for the Addon Downthemall. You have to choose on the left navigation the Download Management Link.
In the most Popular list you will see the Addon Downthemall. Please be aware that you have to use the Mozilla Firefox Browser to download the Addon.
Click on the Download Anyway Button and have some Patient, the Wayback Mashine will be redirected to download page.
Now you should get the Downthemall Addon in .xpi File. If you can’t install the Addon, download mine:
Now you can install the Addon manually on the Waterfox Browser. Write in URL about:addons and Setting Icon > Install Add-on From File..
Download Multiple Files on Facebook
Now we can go to Group Files and right click on white space, then choose Downthemall. There you can see a lot URL’s and Description. Earlier it used to work when you write your Filter for example just PDF Files (.pdf) and click start button. Currently Facebook has changed the structure of their code, so if you press the button now, there will be just .html files installed.
In order to let your Filter work, you have to click on the right place of file the “…” button, so actual download link will be loaded. Then you can download it with Downthemall Addon. But we don’t want to click on all “…” buttons. With following Javascript Code you can have all the “…” clicked with one Function. Before you run following code, make sure that you see all the files on screen, just click “See more…” down below the files till the page ends.
var elements = document.querySelectorAll("._51mx button");
for (var i = 0; i < elements.length; i++) {elements[i].click();}
In the first line all buttons with parent class “_51mx” will be selected. Maybe they will have different names in future. You can easily find the common class for buttons or their parents with Developer Console. Just find the common class name and write the Javascript Code in the Console.
Now you can right click on the page and choose Downthemall Addon. The filter you should use is the Link of Facebook Download URL:
Now let the magic begin 🙂 I wanted to make a video tutorial for it, but my Screencasting Software betrayed on me and didn’t saved the video properly, and i haven’t given a shot again 🙂 If you have further Questions, comment please down below.
Hi Aziz,
Can you please help me out to have this coding,
I tried this in console, and it shows undefined.
I tried correcting the word docuemnt to document, still the code is showing undefined.
I tried it in Waterfox, and also in Mozilla Firefox older version 2019 March, still it is not gonna help.
Please check and advise, might FB has changed their coding, I am not familier with Java, though I found its still _51mx.
Please advise.
Hi Aziz,
Please ignore my last mail.
Thanks a ton for this help!
while I stucked on undefined, I later noticed you have again used elements on the next line, showing in the screenshot, which you haven’t mentioned in the text code line.
I tried that and it works! furthermore, Firefox returns some file as Error : File name should not contain illegal character error. hence I tried same with Chrome and it actually works.
So, thanks again, it helps me lot, as I have Group that has 24k files till date!!!
Hi Suman, i’m glad you could solve it on your own 🙂 but i don’t which line do you mean, which i didn’t mention it in text. Can you clarify it for others, so they won’t have the same error as yours.
Hi Aziz
I try many times, but really couldnt make it
Please make a video tutorial
Hi Hector, i think i should. how urgent is your case?
Here you go: https://youtu.be/Awgncr7HVlI
I can’t find the ID of the buttons, how can I find the ID of the buttons correctly?
Please help me… badly needed
Hi have you watched my Tutorial?
https://youtu.be/Awgncr7HVlI
You don’t need actually an ID
Hi there, doesn’t exist in the latest code for the files section anymore. I made sure that all “…” is visible. Is there a workaround for this please? Thank you so much!
Code below:
Hi, there should be a workaround for the new theme of facebook in youtube comments: https://www.youtube.com/watch?v=Awgncr7HVlI&feature=emb_logo
Hey,
It was not working anymore, so I changed facebook layout to old one. It worked, I downloaded all files, but all they were corrupt. Why?
Hi, what do you mean with corrupt? Maybe you dont have the right programm to open it.
for example, if you download a pptx File, you have to have the Microsoft Powerpoint.
I was able to get the DownThemAll to work for my firefox, however everything it downloaded was blank! The open tab at the top had the correct name on in, but the entire page was blank?
Hi, you should install Waterfox Browser. It’s an out-dated plugin, that’s why it won’t work with firefox.
Hi, will you mind sharing how to BATCH download all videos in the UNITS section, with the video titles intact? Thanks!
Hi Aziz
I followed your video and instructions here, but it seems i cannot find the new parent class, it isn’t this any more “_51mx”. Could you please help, I’d really appreciate it.
Thanks mark.
Hi Mark, have you tried it on old layout?:https://oldlayout.com/
I have a Video-Tutorial: https://www.youtube.com/watch?v=Awgncr7HVlI
Please look in comments, if someone else had the same problem.
Is there anyway to still do this? Thanks!
This instructions seems to not work anymore. Neither old Facebook layout option.
Thank you for notice. I updated the title.