Greasy Fork is available in English.
Universal Logic: Smartly distinguishes between "Shortlink Next" and "Website Page Next" on ANY site.
当前为
// ==UserScript==
// @name Universal Fast Shortlink Bypasser (Universal Logic v26)
// @namespace https://violentmonkey.top/
// @version 26.0
// @description Universal Logic: Smartly distinguishes between "Shortlink Next" and "Website Page Next" on ANY site.
// @author Gemini AI
// @match *://*/*
// @run-at document-start
// @grant none
// ==/UserScript==
(function() {
'use strict';
const HOST = window.location.hostname;
const TITLE = document.title.toLowerCase();
// ==========================================
// 🛡️ UNIVERSAL SECURITY SHIELD
// ==========================================
// किसी भी साइट पर अगर Cloudflare या Verification चल रहा है, तो स्क्रिप्ट को रोक दो।
if (HOST.includes('cloudflare') ||
HOST.includes('challenge') ||
TITLE.includes('verifying') ||
TITLE.includes('just a moment') ||
TITLE.includes('security check')) {
console.log("[Universal] Security Check Detected. Sleeping.");
return;
}
// ==========================================
// 🧠 UNIVERSAL CONTEXT ENGINE
// ==========================================
// 1. CONTENT SITE DETECTION (Any Blog, Movie, News site)
// इन साइट्स पर हम "Next" बटन को बहुत सावधानी से हैंडल करेंगे।
const IS_CONTENT_SITE = HOST.includes('movie') || HOST.includes('film') || HOST.includes('store') ||
HOST.includes('blog') || HOST.includes('news') || HOST.includes('article');
// 2. SPEED CONTROLLER
// GPLinks = Normal Speed
// Others = Fast Speed
let TIME_FACTOR = HOST.includes('gplinks') ? 1 : 10;
// --- TIME HACK ---
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 ---
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 & PAGINATION DETECTOR
// ==========================================
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 };
}
// ⭐ UNIVERSAL PAGINATION CHECKER ⭐
// यह फंक्शन चेक करता है कि बटन "Page 1, 2, 3" वाला है या नहीं।
function isPagination(el) {
// Check 1: क्या बटन के माता-पिता का नाम 'pagination' या 'nav' है?
const parent = el.parentElement;
if (parent) {
const pClass = (parent.className || "").toLowerCase();
const pId = (parent.id || "").toLowerCase();
if (pClass.includes('pagination') || pClass.includes('nav') || pClass.includes('page')) return true;
if (pId.includes('pagination') || pId.includes('nav')) return true;
}
// Check 2: क्या आस-पास नंबर (1, 2, 3) लिखे हैं?
const siblings = parent ? Array.from(parent.children) : [];
if (siblings.some(sib => /^\d+$/.test(sib.innerText.trim()) && sib !== el)) return true;
// Check 3: क्या लिंक में '/page/' लिखा है?
if (el.tagName === 'A' && el.href && el.href.includes('/page/')) return true;
return false;
}
// ==========================================
// 🕵️ SCANNER
// ==========================================
const MEMORY = new Set();
// अगर कंटेंट साइट है, तो हम सिर्फ स्पेसिफिक बटन ढूँढेंगे।
// अगर शॉर्टलिंक साइट है, तो हम सब कुछ ढूँढेंगे।
const TARGETS = IS_CONTENT_SITE
? ['go to link', 'get link', 'link download', 'click here to continue', 'verify']
: ['skip', 'continue', 'next', 'go to link', 'get link', 'verify', 'i am not a robot'];
function scan() {
const status = getStepStatus();
// Safety: GPLinks या Final Step पर स्पीड नॉर्मल
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;
let text = (el.innerText || el.value || "").toLowerCase().trim();
if (text.length > 30 || text.length < 2) continue;
if (TARGETS.some(key => text.includes(key))) {
// 🛑 UNIVERSAL FILTER:
// अगर टेक्स्ट "Next" है और यह पेजिनेशन (Pagination) जैसा लग रहा है -> इग्नोर करो।
if (text.includes('next')) {
if (IS_CONTENT_SITE || isPagination(el)) {
console.log(`[Universal] Ignoring Pagination/Next on Content Site: ${text}`);
MEMORY.add(el); // इसे याद रखो ताकि बार-बार चेक न करे
continue;
}
}
MEMORY.add(el);
if (status.isFinal) {
// --- STEP 3: MANUAL MODE ---
TIME_FACTOR = 1;
el.style.border = "6px solid #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(`[Universal] Clicking: ${text}`);
el.style.border = "5px solid #00ff00";
setTimeout(() => { el.click(); }, 2000);
}
break;
}
}
}
setInterval(scan, 1000);
})();