Extracts image URLs from a Dropbox page and copies them to the clipboard when a button is clicked.
This user script allows you to extract image URLs from a Dropbox page and conveniently copy them to the clipboard with a single click. It enhances the functionality of Dropbox by automating the process of obtaining direct image links, making it easier to share or use these URLs elsewhere.
sharmanhall
This script is compatible with popular web browsers such as Chrome, Firefox, Edge, Opera, and Safari.
This script uses a scrolling mechanism to load all images on the Dropbox page, even if they are initially hidden due to pagination or lazy-loading. Once all images are loaded, their URLs are extracted and copied to the clipboard. The script automatically adjusts the waiting time for scrolling based on the page load speed, ensuring efficient extraction.
If you encounter any issues or have suggestions for improvements, please visit the support page on GitHub to report them. You can also find the latest updates and more information about the script on its GitHub repository.
This script is released under the MIT license, meaning you can modify and distribute it freely. Feel free to check the license file in the repository for more details.
This Tampermonkey script allows you to extract image URLs from a Dropbox folder page and copy them to your clipboard with a single click. The script adds a "Copy all URLs" button to the Dropbox page, and when you click the button, it scrolls through the entire folder, collects all image URLs, and copies them to your clipboard.
The power of extracting image URLs from a Dropbox folder page and copying them to your clipboard with a single click!
Floating button in the bottom right of your browser window:
Click the button and all image URLs are copied to your clipboard:
Paste all your URLs:
https://raw.githubusercontent.com/tyhallcsu/dropbox-image-url-extractor/main/dropbox-image-bulk-url-extractor
) and click "Import."This Tampermonkey script allows you to extract image URLs from a Dropbox folder page and copy them to your clipboard with a single click. The script adds a "Copy all URLs" button to the Dropbox page, and when you click the button, it scrolls through the entire folder, collects all image URLs, and copies them to your clipboard.
Version | Link | Alternative | Note |
---|---|---|---|
Userscript | Greasy Fork | Install (GitHub) | Work in Progress |
Chrome/Edge/Opera | GitHub | - | Work in progress |
Legacy | Gist | Link | - |
(Optional) Mobile Bookmarklet:
JSCopy code
javascript:(function(){['https://raw.githubusercontent.com/tyhallcsu/dropbox-image-url-extractor/main/dropbox-image-bulk-url-extractor'].map(s=>document.body.appendChild(document.createElement('script')).src=s)})();
Tested and compatible with Tampermonkey.
Nothing appears bottom right:
- Try again on another Dropbox folder page.
- Make sure the Tampermonkey extension is enabled and the script is installed.
- If the issue persists, see Viewing UserJS Logs.
You can adjust the SECONDS_TO_WAIT_FOR_SCROLL
constant in the script to change the amount of time the script waits for new images to load after scrolling to the bottom of the page.
The Tampermonkey script is designed to automate the process of extracting image URLs from a Dropbox folder page and copying them to the user's clipboard. The script is executed as a userscript in the context of the browser's web page, and it operates by interacting with the Document Object Model (DOM) of the Dropbox page. Below is a technical explanation of how the script works:
SECONDS_TO_WAIT_FOR_SCROLL
: A constant that specifies the number of seconds the script should wait for new images to load after scrolling to the bottom of the page.DOWNLOAD_URL_REPLACEMENT
: A constant that specifies the query parameter to be appended to the image URLs to enable direct download.getImageLinks
: A function that queries the DOM for anchor elements (<a>
) containing links to image files. It then extracts the href
attribute of each anchor element, replaces the query parameter ?dl=0
with ?raw=1
to enable direct download, and returns an array of modified URLs.waitForImagesToLoad
: An asynchronous function that programmatically scrolls to the bottom of the page and waits for a specified duration (defined by SECONDS_TO_WAIT_FOR_SCROLL
) to allow new images to load.imageUrls
to store the image URLs that will be extracted from the page.<button>
) and appends it to the DOM. The button is styled and positioned in the bottom right corner of the page. The text content of the button is set to "Copy all URLs."finished
variable, which is initially set to false
.waitForImagesToLoad
function to scroll to the bottom of the page and wait for new images to load.getImageLinks
function to extract the URLs of the newly loaded images. It filters out any URLs that have already been added to the imageUrls
array to avoid duplicates.finished
variable to true
, which will terminate the loop.numUrls
variable.\n
), and copies the string to the clipboard using the GM_setClipboard
function provided by the Tampermonkey API.
The script leverages the Tampermonkey API, DOM manipulation, and asynchronous programming to automate the process of extracting image URLs from a Dropbox folder page and copying them to the user's clipboard. The script is designed to be compatible with the Dropbox web interface.
https://github.com/tyhallcsu/dropbox-image-url-extractor
This script is provided "as is" without warranty of any kind. Use it at your own risk. The author is not responsible for any consequences r###lting from the use of this script.
This project is licensed under the MIT License. See the LICENSE file for details.