Sleazy Fork is available in English.

SimpCity Redirect Bypass

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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