(() => {
/* -------- 1. поле ввода -------- */
const inputSelector =
'body > app-root > app-core > div.game-viewport > div > div > app-goal > div.game-footer-wrapper > div > app-bet-controls > div > div.bet-input > app-bet-input > div > div.input-wrapper > app-bet-spinner > app-spinner > div > div.dropdown-toggle.h-100 > div > div > div';
const input = document.querySelector(inputSelector);
if (!input) {
console.warn('❌ Поле ввода не найдено');
return;
}
/* -------- 2. фокус -------- */
input.focus();
input.click();
/* -------- 3. очистка (Ctrl+A → Backspace) -------- */
const key = (type, key, code) =>
input.dispatchEvent(
new KeyboardEvent(type, {
key,
code,
bubbles: true,
cancelable: true
})
);
key('keydown', 'Control', 'ControlLeft');
key('keydown', 'a', 'KeyA');
key('keyup', 'a', 'KeyA');
key('keyup', 'Control', 'ControlLeft');
key('keydown', 'Backspace', 'Backspace');
key('keyup', 'Backspace', 'Backspace');
/* -------- 4. ввод "4.90" -------- */
const value = '100.90';
for (const ch of value) {
key('keydown', ch, '');
input.textContent += ch;
input.dispatchEvent(new InputEvent('input', { bubbles: true }));
key('keyup', ch, '');
}
console.log('✔️ Значение 4.90 реально введено');
/* -------- 5. клик по controls -------- */
const betSelector =
'body > app-root > app-core > div.game-viewport > div > div > app-goal > div.game-footer-wrapper > div > app-bet-controls > div > div.controls > app-controls > div > button';
const betBtn = document.querySelector(betSelector);
if (!betBtn) {
console.warn('❌ Кнопка controls не найдена');
return;
}
betBtn.click();
console.log('✔️ Ставка нажата');
/* -------- 6. перезагрузка -------- */
setTimeout(() => {
window.location.reload();
}, 1000);
})();