Bypass Modiji Team SPY (Chrome Version)

Automatically bypass Modiji URL (Chrome Compatible)

目前為 2024-12-28 提交的版本,檢視 最新版本

// ==UserScript==
// @name         Bypass Modiji Team SPY (Chrome Version)
// @namespace    CHROME Scripts
// @version      1.2.0
// @grant        GM_setValue
// @grant        GM_getValue
// @grant        GM_addStyle
// @grant        GM_xmlhttpRequest
// @grant        window.onurlchange
// @grant        GM_registerMenuCommand
// @icon         https://lh3.googleusercontent.com/-HPcn7AqepNg/AAAAAAAAAAI/AAAAAAAAAAA/ALKGfknb1BkQiq-8_KUVOYcNAJ4swKivDQ/photo.jp
// @description  Automatically bypass Modiji URL (Chrome Compatible)
// @homepageURL  https://t.me/team_spy_pro
// @supportURL   https://t.me/team_spy_pro
// @include      /^https:\/\/[^\/]+\/safe\.php\?link=https:\/\/modijiurl\.com\/[^\/]+\/\?mid=.*$/
// @include      /^https:\/\/modijiurl\.com\/[^\/]+\/\?mid=.*$/
// @run-at       document-start
// @noframes
// ==/UserScript==

(function() {
    'use strict';

    const url = window.location.href;
    const redirect = (finalUrl) => window.location.assign(finalUrl);
    const getParam = (url, param) => new URLSearchParams(url).get(param);
    const rot13 = (str) => str.replace(/[A-Za-z]/g, char => String.fromCharCode((char.charCodeAt(0) % 32 + 13) % 26 + (char < 'a' ? 65 : 97)));
    const popupsToRedirects = () => window.open = (url, target, features) => (window.location.href = url, window);
    const afterDOMLoaded = (callback) => document.addEventListener('DOMContentLoaded', callback);
    const afterWindowLoaded = (callback) => window.addEventListener('load', callback);
    const isValidUrl = (url) => /^(?:https?|ftp):\/\/(?:\w+\.){1,3}\w+(?:\/\S*)?$/.test(url);
    const clickIfExists = (selector) => {
        let intervalId = setInterval(() => {
            let button = document.querySelector(selector);
            if (button) {
                clearInterval(intervalId);
                button.click();
            }
        }, 1000);
    };
    const redirectIfExists = (selector) => {
        let intervalId = setInterval(() => {
            let button = document.querySelector(selector);
            if (button && button.href && isValidUrl(button.href)) {
                clearInterval(intervalId);
                redirect(button.href);
            }
        }, 500);
    };
    const clickIfExistsNonStop = (selector) => {
        let intervalId = setInterval(() => {
            let button = document.querySelector(selector + ':not(.disabled)');
            if (button) {
                button.click();
            }
        }, 500);
    };
    const redirectIfNotDisabled = (selector) => {
        let intervalId = setInterval(() => {
            let linkButton = document.querySelector(selector + ':not(.disabled)');
            if (linkButton && !linkButton.href.includes('/undefined')) {
                clearInterval(intervalId);
                setTimeout(function() {
                    redirect(linkButton.href);
                }, 500);
            }
        }, 500);
    };
    const clickIfNotDisabled = (buttonSelector) => {
        let intervalId = setInterval(() => {
            let button = document.querySelector(buttonSelector);
            if (!button.hasAttribute('disabled') && !button.classList.contains('disabled')) {
                clearInterval(intervalId);
                setTimeout(function() {
                    button.click();
                }, 500);
            }
        }, 500);
    };
    const checkElementVisible = (element) => element !== null && !!(element.offsetWidth || element.offsetHeight || element.getClientRects().length) && (!element.getAttribute('style') || !element.getAttribute('style').includes('display:none'));
    const clickIfVisible = (selector) => {
        afterDOMLoaded(function() {
            let intervalId = setInterval(() => {
                let element = document.querySelector(selector);
                if (checkElementVisible(element)) {
                    clearInterval(intervalId);
                    element.click();
                }
            }, 1000);
        });
    };
    const preventForcedFocusOnWindow = () => {
        window.mouseleave = true;
        window.onmouseover = true;
        document.hasFocus = function() { return true; };
        Object.defineProperty(document, 'webkitVisibilityState', { get() { return 'visible'; } });
        Object.defineProperty(document, 'visibilityState', { get() { return 'visible'; } });
        window.addEventListener('visibilitychange', function(e) { e.stopImmediatePropagation(); }, true);
        window.addEventListener('focus', onfocus, true);
        document.addEventListener('visibilitychange', function(e) { e.stopImmediatePropagation(); }, true);
        Object.defineProperty(document, 'hidden', { get() { return false; } });
    };

    function browserIsChrome() {
        return /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
    }

    // Check for compatibility and apply script
    if (browserIsChrome()) {
        /^https:\/\/[^\/]+\/safe\.php\?link=https:\/\/modijiurl\.com\/[^\/]+\/\?mid=.*$/.test(url) ? redirect(url.split('?link=')[1]) : null;
        /^https:\/\/modijiurl\.com\/[^\/]+\/\?mid=.*$/.test(url) ? redirectIfNotDisabled('#getLinkButton') : null;
    }
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址