Myrient Collect Links with Filters

Collect, filter links, and then copy to your clipboard with a single button click. filters for links containing "(USA)" and excludes "(demo)" and "(kiosk)". Is fairly easy to modify.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         Myrient Collect Links with Filters
// @version      1.0
// @description  Collect, filter links, and then copy to your clipboard with a single button click. filters for links containing "(USA)" and excludes "(demo)" and "(kiosk)". Is fairly easy to modify.
// @author       Dethkiller15 & ChatGPT
// @match        https://myrient.erista.me/files/*
// @grant        GM_addStyle
// @grant        GM_setClipboard
// @license      MIT
// @namespace https://greasyfork.org/users/994690
// ==/UserScript==

// Note: This is meant to be used with a urls.txt downloader.(something that can batch download urls inside a .txt file) its fairly easy to make one yourself with chatgpt using a .bat or .sh file if you dont want to install one.

(function() {
    'use strict';

    // Add button to the bottom-left of the screen
    const button = document.createElement('button');
    button.textContent = "Copy Links";
    button.id = "copy-links-btn";
    document.body.appendChild(button);

    // Style the button
    GM_addStyle(`
        #copy-links-btn {
            position: fixed;
            bottom: 10px;
            left: 10px;
            z-index: 9999;
            padding: 10px 20px;
            background-color: #007BFF;
            color: white;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            font-size: 14px;
        }
        #copy-links-btn:hover {
            background-color: #0056b3;
        }
    `);

    // Button click event
    button.addEventListener('click', () => {
        const pageUrl = window.location.origin;
        const links = [...document.querySelectorAll('a[href][title]')]
            .filter(link =>
                link.title.toLowerCase().includes("(usa)") &&
                !link.title.toLowerCase().includes("(demo)") &&
                !link.title.toLowerCase().includes("(kiosk)")
            )
            .map(link => new URL(link.href, pageUrl).href);

        // Copy links to clipboard
        if (links.length > 0) {
            GM_setClipboard(links.join('\n'), { type: 'text', mimetype: 'text/plain' });
            alert(`Copied ${links.length} link(s) to clipboard!`);
        } else {
            alert("No matching links found.");
        }
    });
})();