SimpCity Redirect Bypass

Automatically bypasses the "not trusted external site" redirect confirmation page

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

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

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!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

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

// ==UserScript==
// @name         SimpCity Redirect Bypass
// @namespace    
// @license MIT
// @version      1.0
// @description  Automatically bypasses the "not trusted external site" redirect confirmation page
// @match        *://simpcity.cr/redirect/*
// @match        *://simpcity.su/redirect/*
// @grant        none
// @run-at       document-start
// ==/UserScript==

(function() {
    'use strict';

    // Method 1: Parse the destination URL from the page URL's 'to' parameter (fastest, runs at document-start)
    try {
        const params = new URLSearchParams(window.location.search);
        const encodedUrl = params.get('to');
        if (encodedUrl) {
            const destination = atob(encodedUrl);
            if (destination.startsWith('http')) {
                window.location.replace(destination);
                return;
            }
        }
    } catch (e) {
        // Fall through to Method 2
    }

    // Method 2: Fallback - wait for the DOM and click the destination link
    function clickDestination() {
        const link = document.querySelector('.contentRow-main a[href^="http"]') ||
                     document.querySelector('a.link--external[href^="http"]') ||
                     document.querySelector('.p-body-main a[href^="http"]:not([href*="simpcity"])');
        if (link) {
            window.location.replace(link.href);
        }
    }

    if (document.readyState === 'loading') {
        document.addEventListener('DOMContentLoaded', clickDestination);
    } else {
        clickDestination();
    }
})();