Documentation for `my.js`

This document provides an overview of the functions in the my.js file. It includes descriptions, parameters, and examples of how to use each function.

1. openWindow(content)

Description: This function opens a new window with either dynamic HTML content or a URL.

Parameters:

Example:

Open a URL:

openWindow('https://www.example.com');

Open dynamic content:

openWindow('Hello, this is some dynamic content!');
2. getParam(paramName)

Description: This function retrieves the value of a parameter from the current page's URL.

Parameters:

Example:

Get the value of the "userId" parameter:

alert(getParam('userId'));
3. updateProgressBar(progress)

Description: This function updates the width and text of a progress bar on the page.

Parameters:

Example:

Update the progress bar to 50%:

updateProgressBar(50);
4. turboDownload(url)

Description: This function simulates downloading a file from the provided URL while updating the progress bar based on the download status.

Parameters:

Example:

Start the download of a file:

turboDownload('https://www.example.com/somefile');
5. download(filename, sizeOrContent)

Description: This function allows you to download a file with either specified content or by size.

Parameters:

Example:

Download a file with content:

download('example.txt', 'This is a test file.');

Download an empty file of 10KB:

download('empty.txt', 10000);

JavaScript CDN for `my.min.js`

This is the CDN for the JavaScript file my.min.js that contains the functions documented above. You can include this CDN in your HTML file to access the functionalities:

    <script src="https://limon-4w9.pages.dev/my.min.js"></script>
    

Simply include the above <script> tag in the <head> or <body> section of your HTML file to load the script.