LinkJust Bypass

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

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

Advertisement:

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

Advertisement:

// ==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';
        }
    });
})();