Simple Modular Download Script For Vanilla JavaScript | modularDownload.js

modularDownload.js is a simple vanilla JavaScript modular download script. Combine multiple files into a zip file.

javascript module example, js modules, module exports javascript, script typemodule, script typemodule not working, javascript modules es6, javascript plugins free download

How to make use of it:

1. Load the necessary JavaScript and CSS files into the document.

<!-- Bootstrap< -->
<link rel="stylesheet" href="/path/to/cdn/bootstrap.min.css" />
<!-- jQuery -->
<script src="/path/to/cdn/jquery.min.js"></script>
<!-- jszip.js -->
<script src="/path/to/cdn/jszip.min.js"></script>
<!-- jszip-utils.js -->
<script src="/path/to/cdn/jszip-utils.min.js"></script>
<!-- FileSaver.js -->
<script src="/path/to/cdn/FileSaver.min.js"></script>

2. Download and upload the standard download library at the end of the document.

<script src="modularDownload.js"></script>

3. Add items to the download tool.

<form action="#" id="download_form">
    <!--Item One-->
    <li class="list-group-item">
        <input type="checkbox" data-amount=1 data-url1="modularDownload.js" data-folder1="example/folder" />
    <!--Item Two-->
    <li class="list-group-item">
        <input type="checkbox" data-amount=1 data-url1="LICENSE" data-folder1="/" />
    <!--Item Three-->
    <li class="list-group-item">
        <input type="checkbox" data-amount=2 data-url1="" data-folder1="/" data-url2="docs/" data-folder2="docs/"/>
  <!--Value is the file extension-->
  <button type="submit" class="btn btn-primary" value="zip">Download ZIP</button>

4. Create a progress bar indicating the progress of the compression.

<div class="progress hide" id="progress_bar">
  <div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;">

5. Create an empty container to show the result.

<p class="hide" id="result"></p>

Create A Custom Download Builder With The Modular Download Library, modularDownload.js Plugin/Github

See Demo And Download

Official Website(PiSaucer): Click Here

This superior jQuery/javascript plugin is developed by PiSaucer. For extra Advanced Usages, please go to the official website.

Related Posts


Simple And Powerful Fullscreen Lightbox Plugin | fslightbox

Fullscreen Lightbox Basic is a modern and handy plug-in for displaying photos and videos in a clean overlay box. Showcase a single source or create a great…


Product Thumbnail Slider With Positive Zoom Effect jQuery

Positive Zoom is a JavaScript library for creating an image gallery where you can zoom in on the current image by hovering over it. Must Read: Pure…


Create Responsive Gauge Meter Using Pure CSS | CSSGauge

Pure CSS Gauge Meter Component, no SVG, or artboard is used in this component. This component can be easily distinguished by overriding the default style rules and…


Versatile Date and Time Picker Calendar for Bulma

Bulma extension for calendar display can be used on a page as a large calendar with appointments or as a date picker/popup window. A responsive, customizable, and…


Simple Time-Series Chart Viewer with HTML5 Canvas Javascript Library

Pixl chart library displays time series charts in the browser, using the HTML5 Canvas element. It is designed to be lightweight and efficient, while still providing a…


Neumorphic Design Inspiration Style CSS Shapes | Neumorphism

Multi-dimensional design is inspired by the physical world and adds textures, reflection, shadows, layers, and depths to the flat design making the UI elements more visible. CSS…