GoFile Bypass

GoFile Link Bypass

Verzia zo dňa 22.02.2025. Pozri najnovšiu verziu.

Na nainštalovanie skriptu si budete musieť nainštalovať rozšírenie, ako napríklad Tampermonkey, Greasemonkey alebo Violentmonkey.

Na nainštalovanie skriptu si budete musieť nainštalovať rozšírenie, ako napríklad Tampermonkey, % alebo Violentmonkey.

Na nainštalovanie skriptu si budete musieť nainštalovať rozšírenie, ako napríklad Tampermonkey, % alebo Violentmonkey.

Na nainštalovanie skriptu si budete musieť nainštalovať rozšírenie, ako napríklad Tampermonkey alebo Userscripts.

Na inštaláciu tohto skriptu je potrebné nainštalovať rozšírenie, ako napríklad Tampermonkey.

Na inštaláciu tohto skriptu je potrebné nainštalovať rozšírenie správcu používateľských skriptov.

(Už mám správcu používateľských skriptov, nechajte ma ho nainštalovať!)

Na inštaláciu tohto štýlu je potrebné nainštalovať rozšírenie, ako napríklad Stylus.

Na inštaláciu tohto štýlu je potrebné nainštalovať rozšírenie, ako napríklad Stylus.

Na inštaláciu tohto štýlu je potrebné nainštalovať rozšírenie, ako napríklad Stylus.

Na inštaláciu tohto štýlu je potrebné nainštalovať rozšírenie správcu používateľských štýlov.

Na inštaláciu tohto štýlu je potrebné nainštalovať rozšírenie správcu používateľských štýlov.

Na inštaláciu tohto štýlu je potrebné nainštalovať rozšírenie správcu používateľských štýlov.

(Už mám správcu používateľských štýlov, nechajte ma ho nainštalovať!)

// ==UserScript==
// @name         GoFile Bypass
// @namespace    http://tampermonkey.net/
// @version      1.9
// @description  GoFile Link Bypass
// @author       Your Name
// @match        *://gofile.io/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    console.log('GoFile Link Extractor script is running...');

    let jsonData = null;
    let hasPermission = localStorage.getItem('gofile_open_permission') === 'true';

    const originalConsoleLog = console.log;
    console.log = function(...args) {
        originalConsoleLog.apply(console, args);
        args.forEach(arg => {
            if (typeof arg === 'object' && arg.status === 'ok' && arg.data && arg.data.children) {
                jsonData = arg;
                console.log = originalConsoleLog;
                useCapturedData();
            }
        });
    };

    function useCapturedData() {
        if (jsonData) {
            const links = Object.values(jsonData.data.children)
                .filter(item => item.type === 'file' && item.link)
                .map(item => item.link);
            displayLinks(links);
        }
    }

    function displayLinks(links) {
        const container = document.createElement('div');
        container.style.cssText = `
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: #181818;
            color: #fff;
            padding: 18px;
            border-radius: 12px;
            box-shadow: 0 12px 24px rgba(0, 0, 0, 0.6);
            width: 90%;
            max-width: 450px;
            font-family: Arial, sans-serif;
            text-align: center;
            z-index: 9999;
        `;

        const title = document.createElement('h3');
        title.textContent = 'Download Links';
        title.style.marginTop = '0';
        title.style.color = '#f8f9fa';
        container.appendChild(title);

        const textarea = document.createElement('textarea');
        textarea.value = links.join('\n');
        textarea.style.cssText = `
            width: 100%;
            background: #222;
            color: #ddd;
            border: none;
            border-radius: 8px;
            padding: 10px;
            min-height: 140px;
            font-size: 13px;
            resize: vertical;
            outline: none;
            transition: 0.3s;
        `;
        container.appendChild(textarea);

        function createButton(text, bgColor, hoverColor, onClick) {
            const button = document.createElement('button');
            button.textContent = text;
            button.style.cssText = `
                width: auto;
                padding: 8px 16px;
                margin: 8px;
                border: none;
                border-radius: 6px;
                background: ${bgColor};
                color: #fff;
                font-size: 14px;
                cursor: pointer;
                transition: 0.3s;
            `;
            button.addEventListener('mouseenter', () => button.style.background = hoverColor);
            button.addEventListener('mouseleave', () => button.style.background = bgColor);
            button.addEventListener('click', onClick);
            return button;
        }

        // Copy Links Button
        const copyButton = createButton('Copy Links', '#007bff', '#0056b3', () => {
            navigator.clipboard.writeText(textarea.value).then(() => {
                copyButton.textContent = 'Copied!';
                setTimeout(() => copyButton.textContent = 'Copy Links', 2000);
            });
        });
        container.appendChild(copyButton);

        // Open All Links Button (asks permission only once)
        const openAllButton = createButton('Open All', '#28a745', '#218838', () => {
            if (!hasPermission) {
                if (confirm('Are you sure you want to open all links in new tabs?')) {
                    hasPermission = true;
                    localStorage.setItem('gofile_open_permission', 'true');
                } else {
                    return;
                }
            }
            links.forEach(link => window.open(link, '_blank'));
        });
        container.appendChild(openAllButton);

        // Close Button
        const closeButton = createButton('Close', '#dc3545', '#a71d2a', () => document.body.removeChild(container));
        container.appendChild(closeButton);

        // "Powered by GameDrive.Org" Footer
        const footer = document.createElement('p');
        footer.textContent = 'Powered by GameDrive.Org';
        footer.style.cssText = `
            font-size: 12px;
            margin-top: 12px;
            color: #ffffff;
        `;
        container.appendChild(footer);

        document.body.appendChild(container);
    }
})();