https://pastein.ru/t/JK

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


// ==UserScript==
// @name         E-NUM press
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  try to take over the world!
// @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
// @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 (href == "https://merchant.web.money/lmi/SignedLoginFormNewWC.asp") {

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