LinkJust Bypass

Automatically bypass linkjust.com short links — skips the 20s timer / ad wall and redirects straight to the destination.

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği yüklemek için Tampermonkey gibi bir uzantı yüklemeniz gerekir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

Bu stili yüklemek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için Stylus gibi bir uzantı kurmanız gerekir.

Bu stili yükleyebilmek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı kurmanız gerekir.

Bu stili yükleyebilmek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         LinkJust Bypass
// @namespace    https://linkjust.com/
// @version      1.0
// @description  Automatically bypass linkjust.com short links — skips the 20s timer / ad wall and redirects straight to the destination.
// @author       Reverse Engineer
// @match        https://linkjust.com/*
// @match        *://*/*?GetArticle=*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=linkjust.com
// @grant        none
// @run-at       document-start
// ==/UserScript==

(function () {
    'use strict';

    /* ── Strategy 1: Intercept the page before render ── */
    // If we're still on linkjust.com, the real destination is in the
    // canonical <link> or can be extracted from the shortcode directly.
    if (window.location.hostname === 'linkjust.com') {
        const shortCode = window.location.pathname.replace(/^\//, '');
        if (shortCode) {
            // Try fetching the destination via a HEAD request (follows redirects)
            fetch(window.location.href, { method: 'HEAD', redirect: 'follow' })
                .then(resp => {
                    if (resp.redirected && resp.url && !resp.url.includes('linkjust.com')) {
                        window.location.replace(resp.url);
                    }
                })
                .catch(() => {
                    // Fall through to DOM-based strategies below
                });
        }
    }

    /* ── Strategy 2: DOM-ready bypass ── */
    function bypass() {
        // 2a. Canonical link extraction (works when linkjust proxies content on its domain)
        const canonical = document.querySelector('link[rel="canonical"]');
        if (canonical && canonical.href) {
            const dest = canonical.href.split('?')[0]; // strip any query params
            if (!dest.includes(window.location.hostname) && dest !== window.location.href.split('?')[0]) {
                window.location.replace(dest);
                return;
            }
        }

        // 2b. Remove the GetArticle param from the URL query and reload clean
        const url = new URL(window.location.href);
        if (url.searchParams.has('GetArticle')) {
            url.searchParams.delete('GetArticle');
            const clean = url.toString();
            if (clean !== window.location.href) {
                window.location.replace(clean);
                return;
            }
        }

        // 2c. Kill the timer instantly
        const timerSpan = document.getElementById('timer_seconds');
        if (timerSpan) {
            timerSpan.textContent = '0';
        }

        // 2d. Expose and click the Next button immediately
        const nextBtnLink = document.getElementById('next-timer-btn');
        if (nextBtnLink) {
            nextBtnLink.style.display = 'block';
            nextBtnLink.click();
        }
        const nextBtn = nextBtnLink && nextBtnLink.querySelector('button');
        if (nextBtn) nextBtn.click();

        // 2e. Hide the timer/ad overlay div entirely
        const timerDiv = document.getElementById('linkjust-timer');
        if (timerDiv) {
            timerDiv.style.display = 'none';
        }

        // 2f. Remove any fixed overlays that might be blocking content
        const overlays = document.querySelectorAll('div[style*="position: fixed"], div[style*="position:fixed"]');
        overlays.forEach(el => {
            if (el.offsetParent !== null && el.innerText.includes('linkjust') || el.id === 'linkjust-timer') {
                el.remove();
            }
        });

        // 2g. Unhide the main content
        document.body.style.overflow = 'auto';
        const mainContent = document.getElementById('main') || document.querySelector('.site-main') || document.querySelector('.content-area') || document.querySelector('article');
        if (mainContent) {
            mainContent.style.display = 'block';
            mainContent.style.visibility = 'visible';
        }
    }

    // Run on DOMContentLoaded
    if (document.readyState === 'loading') {
        document.addEventListener('DOMContentLoaded', bypass);
    } else {
        bypass();
    }

    // Also run a micro-delay version in case elements are injected dynamically
    setTimeout(bypass, 250);
    setTimeout(bypass, 500);

    /* ── Strategy 3: Intercept link clicks to show real destinations ── */
    document.addEventListener('mouseover', function (e) {
        const link = e.target.closest('a[href*="linkjust.com"]');
        if (link) {
            link.title = '🔄 LinkJust link — bypassing automatically';
        }
    });
})();