Linkvertise Bypass with Timer

Automatically bypass Linkvertise links with a cool GUI and countdown timer

Size

12.0 KB

Version

1.0.1

Created

Oct 30, 2025

Updated

15 days ago

1// ==UserScript==
2// @name		Linkvertise Bypass with Timer
3// @description		Automatically bypass Linkvertise links with a cool GUI and countdown timer
4// @version		1.0.1
5// @match		https://*.linkvertise.com/*
6// @icon		https://linkvertise.com/favicon.ico
7// @grant		GM.xmlhttpRequest
8// @grant		GM.getValue
9// @grant		GM.setValue
10// ==/UserScript==
11(function() {
12    'use strict';
13
14    console.log('Linkvertise Bypass: Extension loaded');
15
16    // Create the cool GUI overlay
17    function createBypassGUI() {
18        console.log('Creating bypass GUI');
19        
20        // Create overlay container
21        const overlay = document.createElement('div');
22        overlay.id = 'linkvertise-bypass-overlay';
23        overlay.style.cssText = `
24            position: fixed;
25            top: 0;
26            left: 0;
27            width: 100%;
28            height: 100%;
29            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
30            z-index: 999999;
31            display: flex;
32            justify-content: center;
33            align-items: center;
34            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
35        `;
36
37        // Create main card
38        const card = document.createElement('div');
39        card.style.cssText = `
40            background: white;
41            border-radius: 20px;
42            padding: 40px;
43            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
44            text-align: center;
45            max-width: 500px;
46            width: 90%;
47            animation: slideIn 0.5s ease-out;
48        `;
49
50        // Add animation keyframes
51        const style = document.createElement('style');
52        style.textContent = `
53            @keyframes slideIn {
54                from {
55                    transform: translateY(-50px);
56                    opacity: 0;
57                }
58                to {
59                    transform: translateY(0);
60                    opacity: 1;
61                }
62            }
63            @keyframes pulse {
64                0%, 100% {
65                    transform: scale(1);
66                }
67                50% {
68                    transform: scale(1.05);
69                }
70            }
71            @keyframes spin {
72                from {
73                    transform: rotate(0deg);
74                }
75                to {
76                    transform: rotate(360deg);
77                }
78            }
79        `;
80        document.head.appendChild(style);
81
82        // Create icon
83        const icon = document.createElement('div');
84        icon.innerHTML = '🚀';
85        icon.style.cssText = `
86            font-size: 64px;
87            margin-bottom: 20px;
88            animation: pulse 2s infinite;
89        `;
90
91        // Create title
92        const title = document.createElement('h1');
93        title.textContent = 'Linkvertise Bypass';
94        title.style.cssText = `
95            color: #333;
96            font-size: 32px;
97            margin: 0 0 10px 0;
98            font-weight: 700;
99        `;
100
101        // Create subtitle
102        const subtitle = document.createElement('p');
103        subtitle.textContent = 'Preparing to bypass...';
104        subtitle.id = 'bypass-status';
105        subtitle.style.cssText = `
106            color: #666;
107            font-size: 16px;
108            margin: 0 0 30px 0;
109        `;
110
111        // Create timer circle
112        const timerContainer = document.createElement('div');
113        timerContainer.style.cssText = `
114            position: relative;
115            width: 150px;
116            height: 150px;
117            margin: 0 auto 30px auto;
118        `;
119
120        const timerCircle = document.createElement('div');
121        timerCircle.style.cssText = `
122            width: 100%;
123            height: 100%;
124            border-radius: 50%;
125            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
126            display: flex;
127            justify-content: center;
128            align-items: center;
129            box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
130        `;
131
132        const timerText = document.createElement('div');
133        timerText.id = 'timer-text';
134        timerText.textContent = '5';
135        timerText.style.cssText = `
136            color: white;
137            font-size: 64px;
138            font-weight: 700;
139        `;
140
141        timerCircle.appendChild(timerText);
142        timerContainer.appendChild(timerCircle);
143
144        // Create progress bar
145        const progressContainer = document.createElement('div');
146        progressContainer.style.cssText = `
147            width: 100%;
148            height: 8px;
149            background: #e0e0e0;
150            border-radius: 10px;
151            overflow: hidden;
152            margin-bottom: 20px;
153        `;
154
155        const progressBar = document.createElement('div');
156        progressBar.id = 'progress-bar';
157        progressBar.style.cssText = `
158            width: 0%;
159            height: 100%;
160            background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
161            border-radius: 10px;
162            transition: width 1s linear;
163        `;
164
165        progressContainer.appendChild(progressBar);
166
167        // Create info text
168        const infoText = document.createElement('p');
169        infoText.textContent = 'Please wait while we bypass Linkvertise...';
170        infoText.style.cssText = `
171            color: #999;
172            font-size: 14px;
173            margin: 0;
174        `;
175
176        // Assemble the card
177        card.appendChild(icon);
178        card.appendChild(title);
179        card.appendChild(subtitle);
180        card.appendChild(timerContainer);
181        card.appendChild(progressContainer);
182        card.appendChild(infoText);
183
184        overlay.appendChild(card);
185        document.body.appendChild(overlay);
186
187        return {
188            overlay,
189            subtitle,
190            timerText,
191            progressBar
192        };
193    }
194
195    // Update the GUI with status
196    function updateStatus(elements, message) {
197        if (elements && elements.subtitle) {
198            elements.subtitle.textContent = message;
199            console.log('Status:', message);
200        }
201    }
202
203    // Start countdown timer
204    function startCountdown(elements, seconds, callback) {
205        let remaining = seconds;
206        const totalSeconds = seconds;
207        
208        const interval = setInterval(() => {
209            remaining--;
210            
211            if (elements.timerText) {
212                elements.timerText.textContent = remaining;
213            }
214            
215            if (elements.progressBar) {
216                const progress = ((totalSeconds - remaining) / totalSeconds) * 100;
217                elements.progressBar.style.width = progress + '%';
218            }
219            
220            if (remaining <= 0) {
221                clearInterval(interval);
222                callback();
223            }
224        }, 1000);
225    }
226
227    // Extract the target URL from Linkvertise
228    async function extractTargetURL() {
229        console.log('Attempting to extract target URL');
230        
231        const currentURL = window.location.href;
232        console.log('Current URL:', currentURL);
233        
234        // Method 1: Try to get from URL parameters
235        const urlParams = new URLSearchParams(window.location.search);
236        if (urlParams.has('r')) {
237            const targetURL = decodeURIComponent(urlParams.get('r'));
238            console.log('Found target in URL params:', targetURL);
239            return targetURL;
240        }
241        
242        // Method 2: Use Linkvertise API bypass
243        try {
244            const linkId = window.location.pathname.split('/')[1];
245            const slug = window.location.pathname.split('/')[2];
246            
247            console.log('Link ID:', linkId, 'Slug:', slug);
248            
249            // Try bypass API
250            const bypassURL = `https://bypass.pm/bypass2?url=${encodeURIComponent(currentURL)}`;
251            console.log('Trying bypass API:', bypassURL);
252            
253            const response = await GM.xmlhttpRequest({
254                method: 'GET',
255                url: bypassURL,
256                headers: {
257                    'User-Agent': 'Mozilla/5.0'
258                }
259            });
260            
261            if (response.responseText) {
262                try {
263                    const data = JSON.parse(response.responseText);
264                    if (data.destination) {
265                        console.log('Found destination from API:', data.destination);
266                        return data.destination;
267                    }
268                } catch (e) {
269                    console.log('API response not JSON, trying to parse as text');
270                    // If response is just the URL
271                    if (response.responseText.startsWith('http')) {
272                        return response.responseText.trim();
273                    }
274                }
275            }
276        } catch (error) {
277            console.error('Bypass API error:', error);
278        }
279        
280        // Method 3: Try to find target in page content
281        const scripts = document.querySelectorAll('script');
282        for (const script of scripts) {
283            const content = script.textContent;
284            
285            // Look for target URL patterns
286            const patterns = [
287                /target["\s:]+["']([^"']+)["']/i,
288                /destination["\s:]+["']([^"']+)["']/i,
289                /redirect["\s:]+["']([^"']+)["']/i,
290                /"url":\s*"([^"]+)"/i
291            ];
292            
293            for (const pattern of patterns) {
294                const match = content.match(pattern);
295                if (match && match[1] && match[1].startsWith('http')) {
296                    console.log('Found target in script:', match[1]);
297                    return match[1];
298                }
299            }
300        }
301        
302        // Method 4: Check meta tags
303        const metaTags = document.querySelectorAll('meta');
304        for (const meta of metaTags) {
305            const content = meta.getAttribute('content');
306            if (content && content.startsWith('http') && !content.includes('linkvertise')) {
307                console.log('Found target in meta tag:', content);
308                return content;
309            }
310        }
311        
312        console.log('Could not extract target URL');
313        return null;
314    }
315
316    // Main bypass function
317    async function bypassLinkvertise() {
318        console.log('Starting Linkvertise bypass');
319        
320        // Create the GUI
321        const guiElements = createBypassGUI();
322        
323        // Update status
324        updateStatus(guiElements, 'Analyzing link...');
325        
326        // Wait a moment for page to load
327        await new Promise(resolve => setTimeout(resolve, 1000));
328        
329        // Try to extract target URL
330        updateStatus(guiElements, 'Extracting destination...');
331        const targetURL = await extractTargetURL();
332        
333        if (targetURL) {
334            updateStatus(guiElements, 'Destination found! Redirecting in...');
335            console.log('Target URL found:', targetURL);
336            
337            // Start countdown
338            startCountdown(guiElements, 5, () => {
339                updateStatus(guiElements, 'Redirecting now...');
340                console.log('Redirecting to:', targetURL);
341                window.location.href = targetURL;
342            });
343        } else {
344            updateStatus(guiElements, 'Could not find destination URL');
345            console.error('Failed to extract target URL');
346            
347            // Show error message
348            setTimeout(() => {
349                if (guiElements.subtitle) {
350                    guiElements.subtitle.innerHTML = 'Unable to bypass this link automatically.<br>Please try manually or report this issue.';
351                    guiElements.subtitle.style.color = '#e74c3c';
352                }
353            }, 2000);
354        }
355    }
356
357    // Initialize when page loads
358    function init() {
359        console.log('Initializing Linkvertise Bypass');
360        
361        // Wait for page to be ready
362        if (document.readyState === 'loading') {
363            document.addEventListener('DOMContentLoaded', bypassLinkvertise);
364        } else {
365            // DOM is already ready
366            setTimeout(bypassLinkvertise, 500);
367        }
368    }
369
370    // Start the extension
371    init();
372})();
Linkvertise Bypass with Timer | Robomonkey