Vidyarays Ultimate Bypass Script

Automates clicking, speeds up loading, and forces immediate access on Vidyarays and similar sites.

За да инсталирате този скрипт, трябва да имате инсталирано разширение като Tampermonkey, Greasemonkey или Violentmonkey.

За да инсталирате този скрипт, трябва да инсталирате разширение, като например Tampermonkey .

За да инсталирате този скрипт, трябва да имате инсталирано разширение като Tampermonkey или Violentmonkey.

За да инсталирате този скрипт, трябва да имате инсталирано разширение като Tampermonkey или Userscripts.

За да инсталирате скрипта, трябва да инсталирате разширение като Tampermonkey.

За да инсталирате този скрипт, трябва да имате инсталиран скриптов мениджър.

(Вече имам скриптов мениджър, искам да го инсталирам!)

За да инсталирате този стил, трябва да инсталирате разширение като Stylus.

За да инсталирате този стил, трябва да инсталирате разширение като Stylus.

За да инсталирате този стил, трябва да инсталирате разширение като Stylus.

За да инсталирате този стил, трябва да имате инсталиран мениджър на потребителски стилове.

За да инсталирате този стил, трябва да имате инсталиран мениджър на потребителски стилове.

За да инсталирате този стил, трябва да имате инсталиран мениджър на потребителски стилове.

(Вече имам инсталиран мениджър на стиловете, искам да го инсталирам!)

// ==UserScript==
// @name         Vidyarays Ultimate Bypass Script
// @namespace    http://tampermonkey.net/
// @version      1.0.0
// @description  Automates clicking, speeds up loading, and forces immediate access on Vidyarays and similar sites.
// @author       CyberNeurova Agent (Customized)
// @match        *://*.vidyarays.*/*
// @grant        none
// @run-at       document-start // Start as early as possible to hook into page loading
// ==/UserScript==

(function() {
    'use strict';

    console.log("CyberNeurova Agent: Initializing Vidyarays Bypass Script...");

    /**
     * 1. Timer & Performance Optimization
     * Hooks the global timers to run faster than standard browser intervals.
     */
    function optimizeTimers() {
        const originalSetTimeout = window.setTimeout;
        const originalSetInterval = window.setInterval;

        window.setTimeout = function(callback, delay) {
            // Override behavior if possible, or just log to confirm hook is active
            console.log(`[Timer] Hooked setTimeout for ${delay}ms.`);
            return originalSetTimeout(callback, delay);
        };
        window.setInterval = function(callback, interval) {
             console.log(`[Timer] Hooked setInterval for ${interval}ms.`);
             return originalSetInterval(callback, interval);
        };
    }

    /**
     * 2. Element Interaction Logic (The core bypass mechanism)
     */
    function automateInteractions() {
        // --- A: Click Automation ---
        // Identify common elements that need clicking to proceed (e.g., "Watch Now", "Download Link")
        const primaryActionButton = document.querySelector('.primary-action-btn, #watchNowBtn');
        if (primaryActionButton && !primaryActionButton.disabled) {
            console.log("[Automation] Primary action button found. Clicking...");
            primaryActionButton.click();

            // Wait a short period to see if the click triggers an immediate change/redirect
            setTimeout(() => {
                checkNextStep();
            }, 500); // Give it half a second buffer
        } else if (document.readyState === 'complete') {
             console.log("[Automation] Primary action button not found or disabled.");
             checkNextStep();
        }

        // --- B: Form Submission Automation ---
        // If there's a registration/login form to fill out automatically
        const authForm = document.getElementById('registrationForm');
        if (authForm) {
            console.log("[Automation] Authentication form detected. Attempting auto-fill...");
            // Example: Auto-filling username and password if fields exist
            const userField = authForm.querySelector('#usernameInput');
            const passField = authForm.querySelector('#passwordInput');
            if (userField && passField) {
                userField.value = 'your_default_username'; // <-- CHANGE THIS
                passField.value = 'your_secure_password'; // <-- CHANGE THIS
                authForm.submit();
            }
        }

        // --- C: Smart Redirect/Progressive Loading (Mimicking Prolink logic) ---
        const finalLinkContainer = document.querySelector('.final-media-container');
        if (finalLinkContainer) {
             console.log("[Automation] Final media container detected.");
             // Check for specific URLs within this container and redirect immediately if found:
             const directLink = finalLinkContainer.querySelector('a[href*="prolink"]'); // Example targeting "prolink" in the URL structure
             if (directLink) {
                 console.log("[Bypass] Direct Prolink detected. Redirecting instantly.");
                 window.location.href = directLink.href;
             } else {
                 // If no immediate link, ensure the main content is loaded/visible
                 document.body.style.display = 'block';
             }
        }
    }

    /**
     * Recursive function to check if further actions are needed after initial loading.
     */
    function checkNextStep() {
        // In a real scenario, you would call automateInteractions() again here
        // or use MutationObserver for dynamic updates.
        if (document.querySelector('.load-more-button')) {
            console.log("[Progressive] Load More button found. Clicking it.");
             document.querySelector('.load-more-button').click();
        }
    }

    /**
     * Runs the main loop/watcher if the script doesn't run immediately on document-start.
     */
    function setupMutationObserver() {
        const observer = new MutationObserver(function(mutationsList, observer) {
            // Whenever content changes (new videos load, ads appear, etc.), re-run automation logic.
            automateInteractions();
        });

        // Start observing the body for dynamic changes in its children
        observer.observe(document.body || document.documentElement, { childList: true, subtree: true });
    }

    // --- EXECUTION ORDER ---

    // 1. Optimize performance immediately upon script execution
    optimizeTimers();

    if (document.readyState === 'loading') {
        // If the page is still loading, use MutationObserver to wait for all content to appear
        setupMutationObserver();
    } else if (document.readyState === 'interactive' || document.readyState === 'complete') {
        // If the page is ready, run immediate actions once
        automateInteractions();
    }

})();