SimpCity Redirect Bypass

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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