Bypass Detector

Adds a bypass button for supported URLs

目前為 2024-10-27 提交的版本,檢視 最新版本

// ==UserScript==
// @name         Bypass Detector
// @namespace    https://tampermonkey.net/
// @version      0.1
// @description  Adds a bypass button for supported URLs
// @author       You
// @match        *://*/*
// @license MIT
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // List of supported domains
    const SUPPORTED_DOMAINS = [
        'example.com'
    ];

    // Check if current URL is from a supported domain
    function isSupportedURL(url) {
        return SUPPORTED_DOMAINS.some(domain => url.includes(domain));
    }

    // Create and add bypass button
    function addBypassButton() {
        if (isSupportedURL(window.location.href)) {
            const button = document.createElement('button');
            button.innerHTML = 'Bypass Link';
            button.style.cssText = `
                position: fixed;
                top: 20px;
                right: 20px;
                z-index: 10000;
                padding: 10px 20px;
                background-color: #4CAF50;
                color: white;
                border: none;
                border-radius: 5px;
                cursor: pointer;
                font-size: 14px;
            `;

            button.addEventListener('mouseover', () => {
                button.style.backgroundColor = '#45a049';
            });

            button.addEventListener('mouseout', () => {
                button.style.backgroundColor = '#4CAF50';
            });

            button.addEventListener('click', () => {
                const encodedUrl = encodeURIComponent(window.location.href);
                window.location.href = `{encodedUrl}`;
            });

            document.body.appendChild(button);
        }
    }

    // Run when page loads
    window.addEventListener('load', addBypassButton);
})();