Extensions I wrote so that when I click on the shared google drive link, when I click on that link in the browser, it will automatically download the files.
First, you must download this utility as a .zip file. Then unzip it.
Open the browser and go to the extension management page (chrome://extensions, edge://extensions, ...).
Enable Developer mode if necessary.
Click Load unpacked to select the previously unpacked folder, or drag it to the extension management page to push the extension to the browser.
So, you have installed the Auto Download Files extension from the Google Drive URL. You can now click the google drive link and the browser will automatically download the file to your device.
google_drive_downloader.mp4
url.split(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/)
This is a complex regular expression to parse a URL into elements like protocol, domain, path, query parameters, and fragment.
([^:\/?#]+)
: get protocol "http://" or protocol "https://", if available.(\/\/([^\/?#]*))
: get the domain name part, for example "www.example.com".([^?#]*)
: get the path after the domain name, for example "/path/to/file".(\?([^#]*))?
: get the query parameter string after the "?".(#(.*))?
: get the fragment string after the "#" sign.
The result of the split() method will be an array containing the elements split from the URL according to the above regular expression.