Greasy Fork

Greasy Fork is available in English.

Universal Fast Shortlink Bypasser (Intelligent v24)

Fixes "Next Page" loop on movie sites. Smart Pagination Detection + Fast Timer.

当前为 2026-02-03 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Universal Fast Shortlink Bypasser (Intelligent v24)
// @namespace    https://violentmonkey.top/
// @version      24.0
// @description  Fixes "Next Page" loop on movie sites. Smart Pagination Detection + Fast Timer.
// @author       Gemini AI
// @match        *://*/*
// @run-at       document-start
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    const HOST = window.location.hostname;

    // 🛡️ SECURITY SHIELD: Cloudflare etc.
    if (HOST.includes('cloudflare') || HOST.includes('challenge')) return;

    // ==========================================
    // 🧠 SMART CONTEXT ENGINE
    // ==========================================
    
    // 1. IS IT A MOVIE/CONTENT SITE?
    // अगर साइट मूवी वाली है, तो हम "Next" जैसे सिंपल शब्दों को टारगेट नहीं करेंगे।
    const IS_CONTENT_SITE = HOST.includes('movie') || HOST.includes('film') || HOST.includes('store') || document.title.includes('Movie');
    
    // 2. SPEED CONTROLLER
    // GPLinks = Normal Speed (1x)
    // PowerGam/Others = Fast Speed (10x)
    let TIME_FACTOR = HOST.includes('gplinks') ? 1 : 10;
    
    // --- TIME HACK (Date.now) ---
    const originalDateNow = Date.now;
    let startTimestamp = originalDateNow();
    Date.now = function() {
        const realElapsed = originalDateNow() - startTimestamp;
        return startTimestamp + (realElapsed * TIME_FACTOR);
    };
    const originalPerformanceNow = performance.now.bind(performance);
    performance.now = function() { return originalPerformanceNow() * TIME_FACTOR; };

    // --- TIMER HACK (setTimeout) ---
    const originalTimeout = window.setTimeout;
    window.setTimeout = function(func, delay) {
        if (delay >= 1000) return originalTimeout(func, (TIME_FACTOR > 1 ? 100 : 1000));
        return originalTimeout(func, delay);
    };

    // ==========================================
    // 🔍 STEP DETECTOR (For Shortlinks)
    // ==========================================
    function getStepStatus() {
        const text = document.body.innerText;
        const match = text.match(/Step\s*(\d+)\s*of\s*(\d+)/i) || text.match(/(\d+)\s*\/\s*(\d+)/);
        if (match) {
            const current = parseInt(match[1]);
            const total = parseInt(match[2]);
            return { isFinal: (current === total && total > 1), step: current };
        }
        return { isFinal: false, step: 0 };
    }

    // ==========================================
    // 🕵️ SCANNER
    // ==========================================
    const MEMORY = new Set();
    
    // अलग-अलग साइट्स के लिए अलग टारगेट्स
    // मूवी साइट्स पर हम "Next" को लिस्ट से हटा देते हैं ताकि पेज न पलटे
    const TARGETS = IS_CONTENT_SITE 
        ? ['go to link', 'get link', 'verify', 'i am not a robot', 'link download', 'click here to continue'] // Safe List
        : ['skip', 'continue', 'next', 'go to link', 'get link', 'verify', 'i am not a robot']; // Full List for Shorteners

    function isPagination(el) {
        // चेक करो कि क्या यह बटन "Pagination" (Page 1, 2, 3) का हिस्सा है?
        // 1. क्लास चेक
        const parent = el.parentElement;
        if (parent && (parent.className.includes('pagination') || parent.className.includes('nav'))) return true;
        
        // 2. पड़ोसी चेक (अगर पास में नंबर 1, 2, 3 हैं)
        const siblings = parent ? Array.from(parent.children) : [];
        const hasNumbers = siblings.some(sib => /^\d+$/.test(sib.innerText.trim()));
        if (hasNumbers) return true;

        return false;
    }

    function scan() {
        // अगर GPLinks या Final Step है, तो स्पीड नॉर्मल कर दो
        const status = getStepStatus();
        if (status.isFinal || HOST.includes('gplinks')) {
            TIME_FACTOR = 1; 
        }

        const elements = document.querySelectorAll('button, a, input[type="submit"], div[role="button"], span.btn');

        for (let el of elements) {
            if (MEMORY.has(el) || el.offsetParent === null) continue;

            const rect = el.getBoundingClientRect();
            if (rect.width > 350 || rect.height > 150) continue; // Size Filter

            let text = (el.innerText || el.value || "").toLowerCase().trim();
            if (text.length > 30 || text.length < 2) continue;

            if (TARGETS.some(key => text.includes(key))) {
                
                // 🛑 CRITICAL FIX: PAGINATION CHECK
                // अगर टेक्स्ट "Next" है और यह मूवी साइट है या पेजिनेशन लग रहा है -> तो इग्नोर करो।
                if (text.includes('next') && (IS_CONTENT_SITE || isPagination(el))) {
                    continue;
                }

                MEMORY.add(el);

                if (status.isFinal) {
                    // --- STEP 3: MANUAL MODE ---
                    console.log("[v24] Final Step: Manual Click Required.");
                    TIME_FACTOR = 1; 
                    
                    el.style.border = "6px solid #ff00ff"; 
                    el.style.boxShadow = "0 0 25px #ff00ff";
                    
                    const ui = document.createElement('div');
                    ui.innerHTML = "⚠️ <b>FINAL STEP:</b> Click Manually!";
                    ui.style.cssText = "position:fixed; top:20px; left:50%; transform:translateX(-50%); background:magenta; color:white; padding:15px; font-weight:bold; z-index:10000; border-radius:10px;";
                    document.body.appendChild(ui);
                } else {
                    // --- AUTO MODE ---
                    console.log(`[v24] Target Found: ${text}`);
                    el.style.border = "5px solid #00ff00"; 
                    setTimeout(() => { el.click(); }, 2000); 
                }
                break;
            }
        }
    }

    setInterval(scan, 1000);

})();