MediaFire Bulk Downloader 2025.04.01

Batch download files from a MediaFire folder with delay

作者
Aaditya Jain
日安装量
1
总安装量
13
评分
0 0 0
版本
1.0
创建于
2025-04-13
更新于
2025-04-13
大小
7.5 KB
许可证
GNU GPL v3
适用于

MediaFire Bulk Downloader

Overview

MediaFire Batch Downloader is a user script that enhances your MediaFire experience by adding batch download functionality for folders and automating single file downloads. This tool is designed to save you time when downloading multiple files from MediaFire folders.

Version: 1.0
Author: Aditya Jain
License: GNU GPL v3
Github: https://gist.github.com/AadityaJain-Dev/a0f889cf0077a19c17e1ec7e3f53481b

Features

  • Folder Page Enhancement: Adds a "DOWNLOAD ALL" button that allows you to download all files in a folder with a single click
  • File Page Automation: When visiting a single file page, automatically starts the download and closes the tab after a delay
  • Throttled Downloads: Implements delays between downloads to prevent overwhelming your browser
  • Progressive Loading: Automatically scrolls through folder pages to load all files before starting the batch download

Installation

Prerequisites

Installation Steps

  1. Install one of the user script manager extensions mentioned above
  2. Click on the extension icon in your browser
  3. Select "Create a new script" or "Add a new script"
  4. Copy and paste the entire script code
  5. Save the script (Ctrl+S or Command+S)
  6. The script is now installed and ready to use

Usage

Downloading All Files from a Folder

  1. Navigate to any MediaFire folder (URL starts with https://www.mediafire.com/folder/)
  2. You will see a green "DOWNLOAD ALL" button where the "Upgrade" button usually appears
  3. Important: Ensure that popups are allowed for MediaFire in your browser settings
  4. Click the "DOWNLOAD ALL" button
  5. The script will:
    • Scroll through the entire folder to load all files
    • Collect all file links
    • Open each file in a new tab with an 8-second delay between files
    • Each file tab will automatically download the file and close after 5 seconds

Single File Download Automation

  1. When you visit a MediaFire file page (URL starts with https://www.mediafire.com/file/)
  2. The script will automatically:
    • Locate the download link
    • Initiate the download
    • Close the tab after 5 seconds

Troubleshooting

Popup Blocker Issues

If you click "DOWNLOAD ALL" and nothing happens or you see an alert about popups being blocked:

  1. Look for a popup blocker notification in your browser's address bar
  2. Click on it and select "Always allow popups from MediaFire"
  3. Refresh the page and try again

Files Not Loading

If not all files in a large folder are being downloaded:

  1. The script uses automatic scrolling to load all files
  2. For very large folders, you might need to modify the script to increase the scrolling delay
  3. Change the 1500 value in the scrolling function to a higher number (e.g., 2500)

Browser Performance

If your browser becomes unresponsive during batch downloads:

  1. Increase the delay between opening tabs by changing the 8000 value in the script to a higher number
  2. For very large folders, consider downloading in smaller batches by manually selecting files

How It Works

Technical Details

The script uses several JavaScript techniques to accomplish its tasks:

  1. URL Detection: Determines if you're on a folder page or a file page
  2. DOM Manipulation: Adds the "DOWNLOAD ALL" button by replacing the existing upgrade button
  3. Mutation Observer: Monitors the file list as new items load when scrolling
  4. Progressive Scrolling: Uses a while loop with promises to scroll until all content is loaded
  5. Popup Management: Opens files in new tabs with delays to prevent overwhelming the browser
  6. Automated Navigation: On file pages, automatically redirects to the direct download link

Code Structure

The script is organized into several key functions:

  • init(): Entry point that determines the page type
  • handleFolderPage(): Sets up the folder page enhancement
  • handleFilePage(): Handles automatic download on file pages
  • checkPopupPermission(): Verifies popup permissions
  • addDownloadAllButton(): Creates and adds the download button
  • initiateDownloadAll(): Main function that performs the batch download
  • scrollAndCollect(): Progressively loads all files in the folder

Customization

You can customize the script by modifying certain values:

Timing Adjustments

  • Tab close delay: Change 5000 in the file page handler to adjust how quickly tabs close after download starts (in milliseconds)
  • Download interval: Change 8000 in the batch download function to adjust time between opening files (in milliseconds)
  • Scroll delay: Change 1500 in the scrolling function to adjust how long to wait after scrolling (in milliseconds)