https://pastein.ru/t/zd

  скопируйте уникальную ссылку для отправки


// ==UserScript==
// @name         E-NUM press
// @namespace    http://tampermonkey.net/
// @version      0.3
// @description  Скрипт ввода wmid и пароля
// @author       Andronio
// @match        https://merchant.web.money/lmi/payment_conf.asp
// @match        https://merchant.web.money/lmi/SignedLoginFormNewWC.asp*
// @match        https://psp.wmtransfer.com/payment/process/*
// @match        https://merchant.web.money/lmi/payment_do.asp
// @match        https://shoppingcart.aliexpress.com/order/payResult.htm?cashierRequestNo*
// @grant        none
// ==/UserScript==

let mwIdVal = "000000000000";
let wmPassVal = "000000000";



(function repeat() {
    'use strict';
    let href = window.location.href;

    if (href == "https://merchant.web.money/lmi/payment_conf.asp") {
        let enumCode = document.getElementById("ConfirmENum");
        let confirmButton = document.getElementById("do_payment");
        let askENUM = document.getElementById("ConfirmENumSend");

        if (askENUM) askENUM.click();
        if (!enumCode) {
            setTimeout(repeat, 500);
        } else {
            if (enumCode.value == ""){
            // Запуск таймера
            setTimeout(repeat, 500);
            } else {
                confirmButton.click();
            }
        }
    }
    if (/psp\.wmtransfer\.com\/payment\/process\//.test(href)) {
        let returnButton = document.getElementById("returnToMerchant");
        if (!returnButton) {
            setTimeout(repeat, 500);
        } else {
            if (returnButton.clientWidth == 0) {
                setTimeout(repeat, 500);
            } else {
                    returnButton.click();
            }
        }
    }
    if (/merchant\.web\.money\/lmi\/SignedLoginFormNewWC\.asp/.test(href)) {

        let wmId = document.getElementById("wmcheck_no");
        let wmPass = document.getElementById("wmcheck_pwd");
        let wmCapt = document.getElementById("mobilecaptcha");
        let wmAuth = document.getElementById("auth");

        if (wmId && wmPass) {
            if (wmPass.parentNode.parentNode.classList.contains('js-hidden')) {
                if (wmId.value == "") {
                    wmId.value = mwIdVal;
                    wmCapt.focus();
                }
                setTimeout(repeat, 500);
            } else {
                if (wmPass.value == "") {
                    wmPass.value = wmPassVal;
                    if (wmId.value == "") {
                        wmId.value = mwIdVal;
                        wmCapt.focus();
                    }
                }
                if (wmCapt.value != "") wmAuth.click();
            }
        } else {
            setTimeout(repeat, 500);
        }
    }
    if (href == "https://merchant.web.money/lmi/payment_do.asp") {
        let backButton = document.getElementById("back_toshop");
        if (backButton) {
            backButton.click();
        } else {
            setTimeout(repeat, 500);
        }
    }
    if (/shoppingcart\.aliexpress\.com\/order\/payResult\.htm/.test(href)) {

        let mybtn = document.querySelectorAll(".operation-container > .next-btn-primary")

        if (mybtn.length != 0) {
            mybtn[1].click();
        } else {
            setTimeout(repeat, 500);
        }
    }
})();