Real-time Download Link Finder with Copy Button

Finds and displays all download links, and allows copying them to clipboard

Skaber
motoe moto
Daglige installationer
0
Installationer i alt
10
Bedømmelser
0 0 0
Version
1.4
Oprettet
07.10.2024
Opdateret
07.10.2024
Licens
MIT
Gælder for

Real-time Download Link Finder with Clipboard Copy Button

Overview

This Tampermonkey script scans web pages in real time, finding all download links (based on <a> tags with the download attribute). It then lists the found URLs in a small, floating window on the page and provides a button to copy all of these URLs to the clipboard at once.

Features

  • Real-time Link Scanning: The script continuously scans the page every second for any new download links, so it's always up to date with the content.
  • Clipboard Copy Button: A button in the floating window allows you to copy all the found URLs to the clipboard with a single click.
  • Notification: The script will notify the user whether the URLs were successfully copied to the clipboard or if the operation failed.

Usage

  1. Install Tampermonkey: First, install the Tampermonkey extension for your browser.
  2. Add the Script: Once Tampermonkey is installed, click the install button on this page
  3. Domain-Specific: The script is configured to only run on the domain https://making-new-thing-testing-pushing-huginface-yl-dl-1.hf.space/. You can modify this to match the domain where your instance of "MeTube" or another service is hosted (see Customization below).

Customization

To make this script work on your own site, you'll need to modify a couple of things:

  • Domain Matching: Edit the @match directive in the script to match your own domain. For example:

    // @match https://your-metube-instance.com/*
    

    This will allow the script to run only on your site.

  • Appearance Adjustments: The appearance of the floating window and button can be customized through the CSS properties in the script. You can adjust things like window size, button colors, or font styling to match the look of your site.

How It Works

  • The script uses the querySelectorAll method to scan for <a> tags with a download attribute, extracting the href value to build full URLs.
  • These URLs are then displayed in a small window at the bottom right of the screen.
  • When the user clicks the "Copy URLs to Clipboard" button, the script uses the Clipboard API to copy all the found URLs to the clipboard.
  • If the URLs are successfully copied, the user is notified with an alert. Otherwise, an error message is displayed.

Requirements

  • Clipboard API: Ensure your browser supports the Clipboard API, as it's required for the copy functionality to work.
  • HTTPS: The Clipboard API only works on secure (HTTPS) pages, so make sure your website is served over HTTPS for the script to function correctly.

Modifying for Other Domains

To use this script on your own instance of "MeTube" or another site, simply modify the @match rule to include the domain where your site is hosted.

For example, if your instance is hosted at https://my-metube-instance.com/, update the @match like this:

@match https://my-metube-instance.com/*

This will ensure the script only runs on pages from your own site.