Bulk Export Dropbox Image URLs to Clipboard (2023)

Extracts image URLs from a Dropbox page and copies them to the clipboard when a button is clicked.

Auteur
sharmanhall
Nombre d'installations quotidiennes
0
Nombre d'installations
54
Évaluations
0 0 0
Version
3.2
Créer
2023-05-20
Mis à jour
2023-05-20
Compatibilité
Compatible avec Firefox Compatible avec Chrome Compatible avec Opera Compatible avec Safari Compatible avec Edge
Licence
MIT
S'applique à

Bulk Export Dropbox Image URLs (2023)

Description:


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.

Author:

sharmanhall

Compatibility:


This script is compatible with popular web browsers such as Chrome, Firefox, Edge, Opera, and Safari.

Instructions:

  1. Install a user script manager extension such as Tampermonkey or Greasemonkey in your web browser.
  2. Navigate to the Dropbox website.
  3. Once the Dropbox page is fully loaded, a "Copy all URLs" button will appear at the bottom right corner of the page.
  4. Click the "Copy all URLs" button to extract the image URLs and copy them to your clipboard.
  5. Paste the URLs wherever you need them, such as in a document, email, or any other desired location.
  6. The button will be disabled temporarily after copying the URLs to prevent accidental re-copies. It will be re-enabled after 3 seconds.

Additional Information:


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.

Dropbox Image URL Extractor


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.

Bulk Extract All Dropbox Image URLs in Shared Folder to Clipboard

The power of extracting image URLs from a Dropbox folder page and copying them to your clipboard with a single click!

Screenshots


Floating button in the bottom right of your browser window:

image


Click the button and all image URLs are copied to your clipboard:

image


Paste all your URLs:

CleanShot 2023-04-29 at 16 40 11@2x

How to Install

  1. Install the Tampermonkey browser extension from the official website.
  2. Open the Tampermonkey dashboard and go to the "Utilities" tab.
  3. Under "URL," paste the raw URL of the script file (e.g., https://raw.githubusercontent.com/tyhallcsu/dropbox-image-url-extractor/main/dropbox-image-bulk-url-extractor) and click "Import."
  4. Confirm the installation when prompted.

How to Use

  1. Navigate to a Dropbox folder page containing images.
  2. Click the "Copy all URLs" button that appears in the bottom right corner of the page.
  3. The script will scroll through the entire folder, collect all image URLs, and copy them to your clipboard.
  4. The button will display the number of URLs copied and will be temporarily disabled for 3 seconds before becoming active again.

About

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.

Known bugs:

  • None.

Preview(s)


Preview

Downloads


VersionLinkAlternativeNote
UserscriptGreasy ForkInstall (GitHub)Work in Progress
Chrome/Edge/OperaGitHub-Work in progress
LegacyGistLink-

(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)})();
  


Features

Tested and compatible with Tampermonkey.

  • Automatically scrolls through the entire Dropbox folder to load all images.
  • Extracts image URLs and copies them to the clipboard with a single click.
  • Button is temporarily disabled after copying URLs to prevent accidental clicks.
  • Configurable wait time for loading new images.

FAQ / Troubleshooting


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.

Viewing UserJS Logs

  • Open your web browser's Inspect Element and navigate to its Console.
  • Locate the following [UserScript] < message > (you can filter your Console by entering UserScript or [).
  • Feel free to screenshot any error messages to the GitHub for additional help.
  • If nothing appears, this means the script is not executing at all.

Configuration


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.

How it works


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:

  1. The script starts by defining a set of constants and functions that will be used later in the script:
    • 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.
  2. The script creates an empty array imageUrls to store the image URLs that will be extracted from the page.
  3. The script dynamically creates a button element (<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."
  4. The script adds a click event listener to the button. When the button is clicked, the following actions are performed:
    • The script enters a loop that continues until all image URLs have been extracted from the page. The loop is controlled by the finished variable, which is initially set to false.
    • Within the loop, the script calls the waitForImagesToLoad function to scroll to the bottom of the page and wait for new images to load.
    • The script then calls the 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.
    • The script checks whether any new URLs were extracted in the current iteration. If no new URLs were extracted, it sets the finished variable to true, which will terminate the loop.
    • The script keeps track of the total number of URLs extracted in the numUrls variable.
  5. Once the loop is complete, the script concatenates the image URLs into a single string, separated by newline characters (\n), and copies the string to the clipboard using the GM_setClipboard function provided by the Tampermonkey API.
  6. The script updates the text content of the button to indicate the number of URLs copied to the clipboard and temporarily disables the button for 3 seconds. After this duration, the button is re-enabled, and the text content is reset to "Copy all URLs."


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.

Source Code


https://github.com/tyhallcsu/dropbox-image-url-extractor

Contacts

Disclaimer


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 resulting from the use of this script.


License


This project is licensed under the MIT License. See the LICENSE file for details.

Author

  • Tyler Hall Tech