PearCrypt Skip

Extract all direct links on PearCrypt without the site loading all its bloated garbage.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

ستحتاج إلى تثبيت إضافة مثل Stylus لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتتمكن من تثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

(لدي بالفعل مثبت أنماط للمستخدم، دعني أقم بتثبيته!)

// ==UserScript==
// @name         PearCrypt Skip
// @version      05-18-26
// @description  Extract all direct links on PearCrypt without the site loading all its bloated garbage.
// @author       maybeyou
// @match        https://pearcrypt.lol/container/*
// @grant        none
// @run-at       document-start
// @namespace https://greatest.deepsurf.us/users/1122886
// ==/UserScript==

(function() {
    'use strict';

    var s = document.createElement('style');
    s.textContent = 'body{display:none!important}';
    document.documentElement.appendChild(s);

    function ready(fn) {
        if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', fn);
        else fn();
    }

    function waitEl(sel, ms) {
        return new Promise(function(res, rej) {
            var t = Date.now();
            function check() {
                var el = document.querySelector(sel);
                if (el) return res(el);
                if (Date.now() - t > (ms||20000)) return rej();
                requestAnimationFrame(check);
            }
            check();
        });
    }

    function waitDialog(ms) {
        return new Promise(function(res, rej) {
            var obs = new MutationObserver(function() {
                var d = document.querySelector('[role="dialog"]');
                if (d && d.dataset.state === 'open') { obs.disconnect(); res(d); }
            });
            obs.observe(document.body, {childList:true, subtree:true, attributes:true, attributeFilter:['data-state']});
            setTimeout(function(){ obs.disconnect(); rej(); }, ms||8000);
        });
    }

    async function getLinks() {
        var btn = await waitEl('button:has(svg.lucide-link2)');
        btn.click();
        var dlg = await waitDialog();
        var els = dlg.querySelectorAll('div[data-radix-scroll-area-viewport] div.rounded-md');
        return Array.from(els).map(function(e){ return e.textContent.trim(); });
    }

    function show(links) {
        window.stop();
        document.documentElement.innerHTML = '';
        var pre = document.createElement('pre');
        pre.textContent = links.join('\n');
        pre.style.cssText = 'margin:20px;font-family:monospace;white-space:pre-wrap;word-break:break-all';
        document.body.appendChild(pre);
    }

    ready(function() {
        getLinks().then(function(links) {
            if (!links.length) throw new Error();
            show(links);
        }).catch(function() {
            document.documentElement.innerHTML = 'Error';
        });
    });
})();