Pastebin skipper for NSFW Leak Telegram Channels

Autoredirect to the links found in pastebin pages used as intermediary steps to get to the final download link.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name         Pastebin skipper for NSFW Leak Telegram Channels
// @description  Autoredirect to the links found in pastebin pages used as intermediary steps to get to the final download link.
// @version      1.0
// @namespace    https://greasyfork.org/users/980489
// @match        https://pastelink.net/*
// @match        https://rentry.org/*
// @match        https://rentry.co/*
// @match        https://justpaste.it/*
// @match        https://telegra.ph/*
// @match        https://graph.org/*
// @match        https://pastemode.com/*
// @match        https://notecanyon.com/*
// @match        https://pastetoday.com/*
// @match        https://pastecanyon.com/*
// @match        https://leakutopia.click/b/*
// @match        https://pastetoday.com/clone/*
// @run-at       document-end
// ==/UserScript==

//---Pastebin skipper----
(function() {
    "use strict";

    function processLinks(selector) {
        const admavenDomains = ["best-links.org", "free-leaks.com"];
        const l1nkv3rt1s3Domains = ["direct-link.net", "link-target.net", "link-hub.net", "link-center.net", "link-to.net"];
        const shortenerDomains = ["vnshortener.com"];
        const filehostDomains = ["mega.nz", "pixeldrain.com", "1fichier.com", "mediafire.com", "gofile.io", "bunkr", "dood", "dooood"];
        const domains = admavenDomains.concat(l1nkv3rt1s3Domains, shortenerDomains, filehostDomains);
        let foundLinks = [];
        const links = document.querySelectorAll(selector);
        links.forEach(link => {
            domains.forEach(domain => {
                if (link.href.includes(domain)) {
                    //alert(link.href);
                    foundLinks.push(link.href);
                }
            });
        });
        if (foundLinks.length === 1) {
            window.location.href = foundLinks[0];
        }
    }

    //document.addEventListener("DOMContentLoaded", function() {

        if (/^https:\/\/(pastelink\.net|rentry\.org|rentry\.co|justpaste\.it|telegra\.ph|graph\.org)\/.*$/.test(window.location.href)) {
            //alert('ok1');
            //document.addEventListener("DOMContentLoaded", function() {
                processLinks('a');
            //});


        } else if (/^https:\/\/(pastemode\.com|notecanyon\.com|pastecanyon\.com|pastetoday\.com)\/.*$/.test(window.location.href)) {
            function waitForLinks() {
                const observer = new MutationObserver((mutations, obs) => {
                    if (document.querySelector('a.url-link')) {
                        obs.disconnect();
                        processLinks('a.url-link');
                    }
                });
                observer.observe(document.body, {
                    childList: true,
                    subtree: true
                });
            }
            //document.addEventListener("DOMContentLoaded", function() {
                waitForLinks();
            //});


        } else if (/^https:\/\/(leakutopia\.click)\/.*$/.test(window.location.href)) {
            //document.addEventListener("DOMContentLoaded", function() {
                processLinks('a.text-\\[\\#3366CC\\]:nth-child(1)');
                setInterval(() => processLinks('a.text-\\[\\#3366CC\\]:nth-child(1)'), 1000); // Check every 1 seconds
            //});


        } else if (/^https:\/\/pastetoday\.com\/clone\/.*$/.test(window.location.href)) {
            //window.addEventListener('load', function() {
                const textarea = document.querySelector('textarea.form-control');
                if (textarea && textarea.value.includes('mega.nz')) {
                    const megaLinkMatch = textarea.value.match(/https:\/\/mega\.nz[^\s]+/);
                    if (megaLinkMatch) {
                        window.location.href = megaLinkMatch[0];
                    }
                }
            //});


        }

    //});

})();
//---Pastebin skipper----